[llvm] r175732 - Don't rely on the isDead() MachineOperand flag when updating LiveIntervals.
Cameron Zwarich
zwarich at apple.com
Thu Feb 21 00:51:58 PST 2013
Author: zwarich
Date: Thu Feb 21 02:51:58 2013
New Revision: 175732
URL: http://llvm.org/viewvc/llvm-project?rev=175732&view=rev
Log:
Don't rely on the isDead() MachineOperand flag when updating LiveIntervals.
Modified:
llvm/trunk/lib/CodeGen/PHIElimination.cpp
Modified: llvm/trunk/lib/CodeGen/PHIElimination.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/PHIElimination.cpp?rev=175732&r1=175731&r2=175732&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/PHIElimination.cpp (original)
+++ llvm/trunk/lib/CodeGen/PHIElimination.cpp Thu Feb 21 02:51:58 2013
@@ -320,7 +320,9 @@ void PHIElimination::LowerPHINode(Machin
}
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.
More information about the llvm-commits
mailing list