diff options
author | Evan Cheng <evan.cheng@apple.com> | 2007-09-12 23:02:04 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2007-09-12 23:02:04 +0000 |
commit | d8317967aaba777b92e0d9aa3259b9538767a256 (patch) | |
tree | c86b0438838cfd3bc02d6ac31bfd3a452abf3705 | |
parent | 302def221cfb922d439118c870953e1b9895b2c2 (diff) | |
download | llvm-d8317967aaba777b92e0d9aa3259b9538767a256.tar.gz |
Fixed a typo that's causing a missing kill marker.
llvm-svn: 41893
-rw-r--r-- | llvm/lib/CodeGen/LiveVariables.cpp | 7 | ||||
-rw-r--r-- | llvm/test/CodeGen/PowerPC/2007-09-12-LiveIntervalsAssert.ll | 15 |
2 files changed, 18 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/LiveVariables.cpp b/llvm/lib/CodeGen/LiveVariables.cpp index 97e8671ca8f5..dd5afcc432b3 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. diff --git a/llvm/test/CodeGen/PowerPC/2007-09-12-LiveIntervalsAssert.ll b/llvm/test/CodeGen/PowerPC/2007-09-12-LiveIntervalsAssert.ll new file mode 100644 index 000000000000..f4b87cf4517b --- /dev/null +++ b/llvm/test/CodeGen/PowerPC/2007-09-12-LiveIntervalsAssert.ll @@ -0,0 +1,15 @@ +; RUN: llvm-as < %s | llc -mtriple=powerpc64-apple-darwin + +declare void @cxa_atexit_check_1(i8*) + +define i32 @check_cxa_atexit(i32 (void (i8*)*, i8*, i8*)* %cxa_atexit, void (i8*)* %cxa_finalize) { +entry: + %tmp7 = call i32 null( void (i8*)* @cxa_atexit_check_1, i8* null, i8* null ) ; <i32> [#uses=0] + br i1 false, label %cond_true, label %cond_next + +cond_true: ; preds = %entry + ret i32 0 + +cond_next: ; preds = %entry + ret i32 0 +} |