summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/LiveVariables.cpp
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2007-09-12 23:02:04 +0000
committerEvan Cheng <evan.cheng@apple.com>2007-09-12 23:02:04 +0000
commitd8317967aaba777b92e0d9aa3259b9538767a256 (patch)
treec86b0438838cfd3bc02d6ac31bfd3a452abf3705 /llvm/lib/CodeGen/LiveVariables.cpp
parent302def221cfb922d439118c870953e1b9895b2c2 (diff)
downloadbcm5719-llvm-d8317967aaba777b92e0d9aa3259b9538767a256.tar.gz
bcm5719-llvm-d8317967aaba777b92e0d9aa3259b9538767a256.zip
Fixed a typo that's causing a missing kill marker.
llvm-svn: 41893
Diffstat (limited to 'llvm/lib/CodeGen/LiveVariables.cpp')
-rw-r--r--llvm/lib/CodeGen/LiveVariables.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/LiveVariables.cpp b/llvm/lib/CodeGen/LiveVariables.cpp
index 97e8671ca8f..dd5afcc432b 100644
--- a/llvm/lib/CodeGen/LiveVariables.cpp
+++ b/llvm/lib/CodeGen/LiveVariables.cpp
@@ -306,9 +306,8 @@ bool LiveVariables::HandlePhysRegKill(unsigned Reg, MachineInstr *RefMI,
for (const unsigned *SubRegs = RegInfo->getImmediateSubRegisters(Reg);
unsigned SubReg = *SubRegs; ++SubRegs) {
MachineInstr *LastRef = PhysRegInfo[SubReg];
- if (LastRef != RefMI)
- SubKills.insert(SubReg);
- else if (!HandlePhysRegKill(SubReg, RefMI, SubKills))
+ if (LastRef != RefMI ||
+ !HandlePhysRegKill(SubReg, RefMI, SubKills))
SubKills.insert(SubReg);
}
@@ -336,7 +335,7 @@ void LiveVariables::addRegisterKills(unsigned Reg, MachineInstr *MI,
bool LiveVariables::HandlePhysRegKill(unsigned Reg, MachineInstr *RefMI) {
SmallSet<unsigned, 4> SubKills;
if (HandlePhysRegKill(Reg, RefMI, SubKills)) {
- addRegisterKilled(Reg, RefMI);
+ addRegisterKilled(Reg, RefMI, true);
return true;
} else {
// Some sub-registers are killed by another MI.
OpenPOWER on IntegriCloud