[llvm-commits] [llvm] r95319 - in /llvm/trunk: lib/CodeGen/ProcessImplicitDefs.cpp test/CodeGen/X86/2010-02-03-DualUndef.ll
Jakob Stoklund Olesen
stoklund at 2pi.dk
Thu Feb 4 10:46:29 PST 2010
Author: stoklund
Date: Thu Feb 4 12:46:28 2010
New Revision: 95319
URL: http://llvm.org/viewvc/llvm-project?rev=95319&view=rev
Log:
Fix small bug in handling instructions with more than one implicitly defined operand.
ProcessImplicitDefs would only mark one operand per instruction with <undef>.
This fixed PR6086.
Added:
llvm/trunk/test/CodeGen/X86/2010-02-03-DualUndef.ll
Modified:
llvm/trunk/lib/CodeGen/ProcessImplicitDefs.cpp
Modified: llvm/trunk/lib/CodeGen/ProcessImplicitDefs.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/ProcessImplicitDefs.cpp?rev=95319&r1=95318&r2=95319&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/ProcessImplicitDefs.cpp (original)
+++ llvm/trunk/lib/CodeGen/ProcessImplicitDefs.cpp Thu Feb 4 12:46:28 2010
@@ -264,8 +264,8 @@
}
}
RUses.clear();
+ ModInsts.clear();
}
- ModInsts.clear();
ImpDefRegs.clear();
ImpDefMIs.clear();
}
Added: llvm/trunk/test/CodeGen/X86/2010-02-03-DualUndef.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/2010-02-03-DualUndef.ll?rev=95319&view=auto
==============================================================================
--- llvm/trunk/test/CodeGen/X86/2010-02-03-DualUndef.ll (added)
+++ llvm/trunk/test/CodeGen/X86/2010-02-03-DualUndef.ll Thu Feb 4 12:46:28 2010
@@ -0,0 +1,27 @@
+; RUN: llc < %s -march=x86-64
+; PR6086
+define fastcc void @prepOutput() nounwind {
+bb: ; preds = %output.exit
+ br label %bb.i1
+
+bb.i1: ; preds = %bb7.i, %bb
+ br i1 undef, label %bb7.i, label %bb.nph.i
+
+bb.nph.i: ; preds = %bb.i1
+ br label %bb3.i
+
+bb3.i: ; preds = %bb5.i6, %bb.nph.i
+ %tmp10.i = trunc i64 undef to i32 ; <i32> [#uses=1]
+ br i1 undef, label %bb4.i, label %bb5.i6
+
+bb4.i: ; preds = %bb3.i
+ br label %bb5.i6
+
+bb5.i6: ; preds = %bb4.i, %bb3.i
+ %0 = phi i32 [ undef, %bb4.i ], [ undef, %bb3.i ] ; <i32> [#uses=1]
+ %1 = icmp slt i32 %0, %tmp10.i ; <i1> [#uses=1]
+ br i1 %1, label %bb7.i, label %bb3.i
+
+bb7.i: ; preds = %bb5.i6, %bb.i1
+ br label %bb.i1
+}
More information about the llvm-commits
mailing list