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:
4a8ee23
)
Watch out for PHI instruction with no source operands.
author
Evan Cheng
<evan.cheng@apple.com>
Thu, 3 Dec 2009 21:50:58 +0000
(21:50 +0000)
committer
Evan Cheng
<evan.cheng@apple.com>
Thu, 3 Dec 2009 21:50:58 +0000
(21:50 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90488
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 ba9be6a87031d59920e49b3055dbec3df8b2463c..2cafbd418f337fb188b318dfa2f0b9eb1fef535c 100644
(file)
--- a/
lib/CodeGen/MachineInstr.cpp
+++ b/
lib/CodeGen/MachineInstr.cpp
@@
-1064,6
+1064,8
@@
bool MachineInstr::isInvariantLoad(AliasAnalysis *AA) const {
unsigned MachineInstr::isConstantValuePHI() const {
if (getOpcode() != TargetInstrInfo::PHI)
return 0;
+ if (getNumOperands() <= 1)
+ return 0;
unsigned Reg = getOperand(1).getReg();
for (unsigned i = 3, e = getNumOperands(); i < e; i += 2)