diff options
author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2010-02-04 18:46:28 +0000 |
---|---|---|
committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2010-02-04 18:46:28 +0000 |
commit | e4d2d96cc8663b9a6040532cea2f2e72688bd895 (patch) | |
tree | 95a029531964c73d0e0dbbfd748eda5930275bc6 | |
parent | 66c439af28a537aaf9382f922f4318757d4692c8 (diff) | |
download | llvm-e4d2d96cc8663b9a6040532cea2f2e72688bd895.tar.gz llvm-e4d2d96cc8663b9a6040532cea2f2e72688bd895.tar.bz2 llvm-e4d2d96cc8663b9a6040532cea2f2e72688bd895.tar.xz |
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95319 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/CodeGen/ProcessImplicitDefs.cpp | 2 | ||||
-rw-r--r-- | test/CodeGen/X86/2010-02-03-DualUndef.ll | 27 |
2 files changed, 28 insertions, 1 deletions
diff --git a/lib/CodeGen/ProcessImplicitDefs.cpp b/lib/CodeGen/ProcessImplicitDefs.cpp index a00f4507af..a0a781bf08 100644 --- a/lib/CodeGen/ProcessImplicitDefs.cpp +++ b/lib/CodeGen/ProcessImplicitDefs.cpp @@ -264,8 +264,8 @@ bool ProcessImplicitDefs::runOnMachineFunction(MachineFunction &fn) { } } RUses.clear(); + ModInsts.clear(); } - ModInsts.clear(); ImpDefRegs.clear(); ImpDefMIs.clear(); } diff --git a/test/CodeGen/X86/2010-02-03-DualUndef.ll b/test/CodeGen/X86/2010-02-03-DualUndef.ll new file mode 100644 index 0000000000..d116ecc6bd --- /dev/null +++ b/test/CodeGen/X86/2010-02-03-DualUndef.ll @@ -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 +} |