aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/SimpleRegisterCoalescing.cpp
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2008-08-05 07:10:38 +0000
committerEvan Cheng <evan.cheng@apple.com>2008-08-05 07:10:38 +0000
commit068b4ff5531062a0c6e93d038c24fcf209527406 (patch)
tree94e567665996f8e6df723b3e45c51c789b7cc0c6 /lib/CodeGen/SimpleRegisterCoalescing.cpp
parent59c0d4fcde6f112dd8e83293c6aa6b7138a05424 (diff)
Fix PR2568: Fix bug that cause redudant kill marker after its live interval has been extended due to coalescing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54346 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SimpleRegisterCoalescing.cpp')
-rw-r--r--lib/CodeGen/SimpleRegisterCoalescing.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/CodeGen/SimpleRegisterCoalescing.cpp b/lib/CodeGen/SimpleRegisterCoalescing.cpp
index 68be3e111f..9cb06ced3f 100644
--- a/lib/CodeGen/SimpleRegisterCoalescing.cpp
+++ b/lib/CodeGen/SimpleRegisterCoalescing.cpp
@@ -533,14 +533,16 @@ void SimpleRegisterCoalescing::RemoveUnnecessaryKills(unsigned Reg,
MachineOperand &UseMO = UI.getOperand();
if (UseMO.isKill()) {
MachineInstr *UseMI = UseMO.getParent();
+#if 0
unsigned SReg, DReg;
if (!tii_->isMoveInstr(*UseMI, SReg, DReg))
continue;
+#endif
unsigned UseIdx = li_->getUseIndex(li_->getInstructionIndex(UseMI));
if (JoinedCopies.count(UseMI))
continue;
const LiveRange *UI = LI.getLiveRangeContaining(UseIdx);
- if (!LI.isKill(UI->valno, UseIdx+1))
+ if (!UI || !LI.isKill(UI->valno, UseIdx+1))
UseMO.setIsKill(false);
}
}