aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2009-12-07 23:10:34 +0000
committerEvan Cheng <evan.cheng@apple.com>2009-12-07 23:10:34 +0000
commitd8f079c25e8bcaf4d10bfa9c3f6a38cd5ac84329 (patch)
treec483d08f99af704be1753b7d64e3e743b2e8b4bf
parent13027640e85b92e60b765a326f18630328d8897d (diff)
downloadexternal_llvm-d8f079c25e8bcaf4d10bfa9c3f6a38cd5ac84329.zip
external_llvm-d8f079c25e8bcaf4d10bfa9c3f6a38cd5ac84329.tar.gz
external_llvm-d8f079c25e8bcaf4d10bfa9c3f6a38cd5ac84329.tar.bz2
Follow up to 90488. Turn a check into an assertion.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90815 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/CodeGen/MachineInstr.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/CodeGen/MachineInstr.cpp b/lib/CodeGen/MachineInstr.cpp
index 3f4a928..12b974d 100644
--- a/lib/CodeGen/MachineInstr.cpp
+++ b/lib/CodeGen/MachineInstr.cpp
@@ -1064,8 +1064,8 @@ bool MachineInstr::isInvariantLoad(AliasAnalysis *AA) const {
unsigned MachineInstr::isConstantValuePHI() const {
if (getOpcode() != TargetInstrInfo::PHI)
return 0;
- if (getNumOperands() <= 1)
- return 0;
+ assert(getNumOperands() >= 3 &&
+ "It's illegal to have a PHI without source operands");
unsigned Reg = getOperand(1).getReg();
for (unsigned i = 3, e = getNumOperands(); i < e; i += 2)