projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d113292
)
Don't rely on the isDead() MachineOperand flag when updating LiveIntervals.
author
Cameron Zwarich
<zwarich@apple.com>
Thu, 21 Feb 2013 08:51:58 +0000
(08:51 +0000)
committer
Cameron Zwarich
<zwarich@apple.com>
Thu, 21 Feb 2013 08:51:58 +0000
(08:51 +0000)
llvm-svn: 175732
llvm/lib/CodeGen/PHIElimination.cpp
patch
|
blob
|
history
diff --git
a/llvm/lib/CodeGen/PHIElimination.cpp
b/llvm/lib/CodeGen/PHIElimination.cpp
index
b84d9d3
..
5584708
100644
(file)
--- a/
llvm/lib/CodeGen/PHIElimination.cpp
+++ b/
llvm/lib/CodeGen/PHIElimination.cpp
@@
-320,7
+320,9
@@
void PHIElimination::LowerPHINode(MachineBasicBlock &MBB,
}
LiveInterval &DestLI = LIS->getInterval(DestReg);
- if (NewInstr->getOperand(0).isDead()) {
+ assert(DestLI.begin() != DestLI.end() &&
+ "PHIs should have nonempty LiveIntervals.");
+ if (DestLI.endIndex().isDead()) {
// A dead PHI's live range begins and ends at the start of the MBB, but
// the lowered copy, which will still be dead, needs to begin and end at
// the copy instruction.