projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1302764
)
Follow up to 90488. Turn a check into an assertion.
author
Evan Cheng
<evan.cheng@apple.com>
Mon, 7 Dec 2009 23:10:34 +0000
(23:10 +0000)
committer
Evan Cheng
<evan.cheng@apple.com>
Mon, 7 Dec 2009 23:10:34 +0000
(23:10 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90815
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/CodeGen/MachineInstr.cpp
patch
|
blob
|
history
diff --git
a/lib/CodeGen/MachineInstr.cpp
b/lib/CodeGen/MachineInstr.cpp
index 3f4a92804c45fd5542a40310fb1d61e78ce80def..12b974d30be9a1ebc35ab8039fca802dc601dd8c 100644
(file)
--- 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)