[llvm-commits] [llvm] r41893 - in /llvm/trunk: lib/CodeGen/LiveVariables.cpp test/CodeGen/PowerPC/2007-09-12-LiveIntervalsAssert.ll
Evan Cheng
evan.cheng at apple.com
Wed Sep 12 16:02:08 PDT 2007
Author: evancheng
Date: Wed Sep 12 18:02:04 2007
New Revision: 41893
URL: http://llvm.org/viewvc/llvm-project?rev=41893&view=rev
Log:
Fixed a typo that's causing a missing kill marker.
Added:
llvm/trunk/test/CodeGen/PowerPC/2007-09-12-LiveIntervalsAssert.ll
Modified:
llvm/trunk/lib/CodeGen/LiveVariables.cpp
Modified: llvm/trunk/lib/CodeGen/LiveVariables.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LiveVariables.cpp?rev=41893&r1=41892&r2=41893&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/LiveVariables.cpp (original)
+++ llvm/trunk/lib/CodeGen/LiveVariables.cpp Wed Sep 12 18:02:04 2007
@@ -306,9 +306,8 @@
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 @@
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.
Added: llvm/trunk/test/CodeGen/PowerPC/2007-09-12-LiveIntervalsAssert.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/2007-09-12-LiveIntervalsAssert.ll?rev=41893&view=auto
==============================================================================
--- llvm/trunk/test/CodeGen/PowerPC/2007-09-12-LiveIntervalsAssert.ll (added)
+++ llvm/trunk/test/CodeGen/PowerPC/2007-09-12-LiveIntervalsAssert.ll Wed Sep 12 18:02:04 2007
@@ -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
+}
More information about the llvm-commits
mailing list