aboutsummaryrefslogtreecommitdiffstats
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
commiteed97ef5d0254bc5e89ef434c4e4857922fbc3d1 (patch)
tree94e567665996f8e6df723b3e45c51c789b7cc0c6 /lib/CodeGen/SimpleRegisterCoalescing.cpp
parent7a5d914f5c4e8860dfa5c68c156e560d1fa38fea (diff)
downloadexternal_llvm-eed97ef5d0254bc5e89ef434c4e4857922fbc3d1.zip
external_llvm-eed97ef5d0254bc5e89ef434c4e4857922fbc3d1.tar.gz
external_llvm-eed97ef5d0254bc5e89ef434c4e4857922fbc3d1.tar.bz2
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 68be3e1..9cb06ce 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);
}
}