diff options
author | Cameron Zwarich <zwarich@apple.com> | 2013-02-21 08:51:58 +0000 |
---|---|---|
committer | Cameron Zwarich <zwarich@apple.com> | 2013-02-21 08:51:58 +0000 |
commit | 3ab4c4ba3045821b8aa5615a7672ca30f017dd10 (patch) | |
tree | 279d5cf3adf85afa96e6d1e8512da604ff85c82b /llvm/lib/CodeGen | |
parent | d113292bcebd1afaae42bed02e0d475eedc6d72b (diff) | |
download | bcm5719-llvm-3ab4c4ba3045821b8aa5615a7672ca30f017dd10.tar.gz bcm5719-llvm-3ab4c4ba3045821b8aa5615a7672ca30f017dd10.zip |
Don't rely on the isDead() MachineOperand flag when updating LiveIntervals.
llvm-svn: 175732
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r-- | llvm/lib/CodeGen/PHIElimination.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/PHIElimination.cpp b/llvm/lib/CodeGen/PHIElimination.cpp index b84d9d33398..5584708eae3 100644 --- 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. |