[llvm-commits] [llvm] r77906 - in /llvm/trunk: lib/CodeGen/MachineInstr.cpp test/CodeGen/Blackfin/cmp-small-imm.ll test/CodeGen/Blackfin/promote-setcc.ll
Jakob Stoklund Olesen
stoklund at 2pi.dk
Sun Aug 2 12:13:03 PDT 2009
Author: stoklund
Date: Sun Aug 2 14:13:03 2009
New Revision: 77906
URL: http://llvm.org/viewvc/llvm-project?rev=77906&view=rev
Log:
Never add a kill flag to a constrained physical register in a two-addr instruction.
Modified:
llvm/trunk/lib/CodeGen/MachineInstr.cpp
llvm/trunk/test/CodeGen/Blackfin/cmp-small-imm.ll
llvm/trunk/test/CodeGen/Blackfin/promote-setcc.ll
Modified: llvm/trunk/lib/CodeGen/MachineInstr.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineInstr.cpp?rev=77906&r1=77905&r2=77906&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/MachineInstr.cpp (original)
+++ llvm/trunk/lib/CodeGen/MachineInstr.cpp Sun Aug 2 14:13:03 2009
@@ -1041,6 +1041,9 @@
if (MO.isKill())
// The register is already marked kill.
return true;
+ if (isPhysReg && isRegTiedToDefOperand(i))
+ // Two-address uses of physregs must not be marked kill.
+ return true;
MO.setIsKill();
Found = true;
}
Modified: llvm/trunk/test/CodeGen/Blackfin/cmp-small-imm.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/Blackfin/cmp-small-imm.ll?rev=77906&r1=77905&r2=77906&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/Blackfin/cmp-small-imm.ll (original)
+++ llvm/trunk/test/CodeGen/Blackfin/cmp-small-imm.ll Sun Aug 2 14:13:03 2009
@@ -1,7 +1,4 @@
; RUN: llvm-as < %s | llc -march=bfin > %t
-; XFAIL: *
-; Assertion failed: (isUsed(Reg) && "Using an undefined register!")
-; function forward, file RegisterScavenging.cpp, line 259.
define i1 @cmp3(i32 %A) {
%R = icmp uge i32 %A, 2
Modified: llvm/trunk/test/CodeGen/Blackfin/promote-setcc.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/Blackfin/promote-setcc.ll?rev=77906&r1=77905&r2=77906&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/Blackfin/promote-setcc.ll (original)
+++ llvm/trunk/test/CodeGen/Blackfin/promote-setcc.ll Sun Aug 2 14:13:03 2009
@@ -1,7 +1,4 @@
; RUN: llvm-as < %s | llc -march=bfin > %t
-; XFAIL: *
-; Assertion failed: (isUsed(Reg) && "Using an undefined register!"),
-; function forward, file RegisterScavenging.cpp, line 259.
; The DAG combiner may sometimes create illegal i16 SETCC operations when run
; after LegalizeOps. Try to tease out all the optimizations in
More information about the llvm-commits
mailing list