[llvm-commits] [llvm] r131002 - in /llvm/trunk/test: DebugInfo/X86/ DebugInfo/X86/dg.exp DebugInfo/X86/stmt-list.ll DebugInfo/stmt-list.ll Transforms/LoopStrengthReduce/2009-11-10-LSRCrash.ll Transforms/LoopStrengthReduce/X86/ Transforms/LoopStrengthReduce/X86/2009-11-10-LSRCrash.ll Transforms/LoopStrengthReduce/X86/dg.exp Transforms/TailDup/X86/ Transforms/TailDup/X86/dg.exp Transforms/TailDup/X86/if-tail-dup.ll Transforms/TailDup/if-tail-dup.ll
Galina Kistanova
gkistanova at gmail.com
Fri May 6 11:24:46 PDT 2011
Author: gkistanova
Date: Fri May 6 13:24:46 2011
New Revision: 131002
URL: http://llvm.org/viewvc/llvm-project?rev=131002&view=rev
Log:
Move few target-dependant tests to appropriate directories.
Added:
llvm/trunk/test/DebugInfo/X86/
llvm/trunk/test/DebugInfo/X86/dg.exp
llvm/trunk/test/DebugInfo/X86/stmt-list.ll
llvm/trunk/test/Transforms/LoopStrengthReduce/X86/
llvm/trunk/test/Transforms/LoopStrengthReduce/X86/2009-11-10-LSRCrash.ll
llvm/trunk/test/Transforms/LoopStrengthReduce/X86/dg.exp
llvm/trunk/test/Transforms/TailDup/X86/
llvm/trunk/test/Transforms/TailDup/X86/dg.exp
llvm/trunk/test/Transforms/TailDup/X86/if-tail-dup.ll
Removed:
llvm/trunk/test/DebugInfo/stmt-list.ll
llvm/trunk/test/Transforms/LoopStrengthReduce/2009-11-10-LSRCrash.ll
llvm/trunk/test/Transforms/TailDup/if-tail-dup.ll
Added: llvm/trunk/test/DebugInfo/X86/dg.exp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/dg.exp?rev=131002&view=auto
==============================================================================
--- llvm/trunk/test/DebugInfo/X86/dg.exp (added)
+++ llvm/trunk/test/DebugInfo/X86/dg.exp Fri May 6 13:24:46 2011
@@ -0,0 +1,5 @@
+load_lib llvm.exp
+
+if { [llvm_supports_target X86] } {
+ RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll}]]
+}
Added: llvm/trunk/test/DebugInfo/X86/stmt-list.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/stmt-list.ll?rev=131002&view=auto
==============================================================================
--- llvm/trunk/test/DebugInfo/X86/stmt-list.ll (added)
+++ llvm/trunk/test/DebugInfo/X86/stmt-list.ll Fri May 6 13:24:46 2011
@@ -0,0 +1,19 @@
+; RUN: llc -mtriple x86_64-pc-linux-gnu < %s | FileCheck %s
+
+; CHECK: .section .debug_line,"", at progbits
+; CHECK-NEXT: .Lsection_line:
+
+; CHECK: .long .Lsection_line # DW_AT_stmt_list
+
+define void @f() {
+entry:
+ ret void
+}
+
+!llvm.dbg.sp = !{!0}
+
+!0 = metadata !{i32 589870, i32 0, metadata !1, metadata !"f", metadata !"f", metadata !"", metadata !1, i32 1, metadata !3, i1 false, i1 true, i32 0, i32 0, i32 0, i32 256, i1 true, void ()* @f, null, null} ; [ DW_TAG_subprogram ]
+!1 = metadata !{i32 589865, metadata !"test2.c", metadata !"/home/espindola/llvm", metadata !2} ; [ DW_TAG_file_type ]
+!2 = metadata !{i32 589841, i32 0, i32 12, metadata !"test2.c", metadata !"/home/espindola/llvm", metadata !"clang version 3.0 ()", i1 true, i1 true, metadata !"", i32 0} ; [ DW_TAG_compile_unit ]
+!3 = metadata !{i32 589845, metadata !1, metadata !"", metadata !1, i32 0, i64 0, i64 0, i32 0, i32 0, i32 0, metadata !4, i32 0, i32 0} ; [ DW_TAG_subroutine_type ]
+!4 = metadata !{null}
Removed: llvm/trunk/test/DebugInfo/stmt-list.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/stmt-list.ll?rev=131001&view=auto
==============================================================================
--- llvm/trunk/test/DebugInfo/stmt-list.ll (original)
+++ llvm/trunk/test/DebugInfo/stmt-list.ll (removed)
@@ -1,19 +0,0 @@
-; RUN: llc -mtriple x86_64-pc-linux-gnu < %s | FileCheck %s
-
-; CHECK: .section .debug_line,"", at progbits
-; CHECK-NEXT: .Lsection_line:
-
-; CHECK: .long .Lsection_line # DW_AT_stmt_list
-
-define void @f() {
-entry:
- ret void
-}
-
-!llvm.dbg.sp = !{!0}
-
-!0 = metadata !{i32 589870, i32 0, metadata !1, metadata !"f", metadata !"f", metadata !"", metadata !1, i32 1, metadata !3, i1 false, i1 true, i32 0, i32 0, i32 0, i32 256, i1 true, void ()* @f, null, null} ; [ DW_TAG_subprogram ]
-!1 = metadata !{i32 589865, metadata !"test2.c", metadata !"/home/espindola/llvm", metadata !2} ; [ DW_TAG_file_type ]
-!2 = metadata !{i32 589841, i32 0, i32 12, metadata !"test2.c", metadata !"/home/espindola/llvm", metadata !"clang version 3.0 ()", i1 true, i1 true, metadata !"", i32 0} ; [ DW_TAG_compile_unit ]
-!3 = metadata !{i32 589845, metadata !1, metadata !"", metadata !1, i32 0, i64 0, i64 0, i32 0, i32 0, i32 0, metadata !4, i32 0, i32 0} ; [ DW_TAG_subroutine_type ]
-!4 = metadata !{null}
Removed: llvm/trunk/test/Transforms/LoopStrengthReduce/2009-11-10-LSRCrash.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/LoopStrengthReduce/2009-11-10-LSRCrash.ll?rev=131001&view=auto
==============================================================================
--- llvm/trunk/test/Transforms/LoopStrengthReduce/2009-11-10-LSRCrash.ll (original)
+++ llvm/trunk/test/Transforms/LoopStrengthReduce/2009-11-10-LSRCrash.ll (removed)
@@ -1,130 +0,0 @@
-; RUN: llc < %s -mtriple=i386-apple-darwin11
-
-define void @_ZN4llvm20SelectionDAGLowering14visitInlineAsmENS_8CallSiteE() nounwind ssp align 2 {
-entry:
- br i1 undef, label %bb3.i, label %bb4.i
-
-bb3.i: ; preds = %entry
- unreachable
-
-bb4.i: ; preds = %entry
- br i1 undef, label %bb.i.i, label %_ZNK4llvm8CallSite14getCalledValueEv.exit
-
-bb.i.i: ; preds = %bb4.i
- unreachable
-
-_ZNK4llvm8CallSite14getCalledValueEv.exit: ; preds = %bb4.i
- br i1 undef, label %_ZN4llvm4castINS_9InlineAsmEPNS_5ValueEEENS_10cast_rettyIT_T0_E8ret_typeERKS6_.exit, label %bb6.i
-
-bb6.i: ; preds = %_ZNK4llvm8CallSite14getCalledValueEv.exit
- unreachable
-
-_ZN4llvm4castINS_9InlineAsmEPNS_5ValueEEENS_10cast_rettyIT_T0_E8ret_typeERKS6_.exit: ; preds = %_ZNK4llvm8CallSite14getCalledValueEv.exit
- br i1 undef, label %_ZL25hasInlineAsmMemConstraintRSt6vectorIN4llvm9InlineAsm14ConstraintInfoESaIS2_EERKNS0_14TargetLoweringE.exit, label %bb.i
-
-bb.i: ; preds = %_ZN4llvm4castINS_9InlineAsmEPNS_5ValueEEENS_10cast_rettyIT_T0_E8ret_typeERKS6_.exit
- br label %_ZL25hasInlineAsmMemConstraintRSt6vectorIN4llvm9InlineAsm14ConstraintInfoESaIS2_EERKNS0_14TargetLoweringE.exit
-
-_ZL25hasInlineAsmMemConstraintRSt6vectorIN4llvm9InlineAsm14ConstraintInfoESaIS2_EERKNS0_14TargetLoweringE.exit: ; preds = %bb.i, %_ZN4llvm4castINS_9InlineAsmEPNS_5ValueEEENS_10cast_rettyIT_T0_E8ret_typeERKS6_.exit
- br i1 undef, label %bb50, label %bb27
-
-bb27: ; preds = %_ZL25hasInlineAsmMemConstraintRSt6vectorIN4llvm9InlineAsm14ConstraintInfoESaIS2_EERKNS0_14TargetLoweringE.exit
- br i1 undef, label %bb1.i727, label %bb.i.i726
-
-bb.i.i726: ; preds = %bb27
- unreachable
-
-bb1.i727: ; preds = %bb27
- unreachable
-
-bb50: ; preds = %_ZL25hasInlineAsmMemConstraintRSt6vectorIN4llvm9InlineAsm14ConstraintInfoESaIS2_EERKNS0_14TargetLoweringE.exit
- br label %bb107
-
-bb51: ; preds = %bb107
- br i1 undef, label %bb105, label %bb106
-
-bb105: ; preds = %bb51
- unreachable
-
-bb106: ; preds = %bb51
- br label %bb107
-
-bb107: ; preds = %bb106, %bb50
- br i1 undef, label %bb108, label %bb51
-
-bb108: ; preds = %bb107
- br i1 undef, label %bb242, label %bb114
-
-bb114: ; preds = %bb108
- br i1 undef, label %bb141, label %bb116
-
-bb116: ; preds = %bb114
- br i1 undef, label %bb120, label %bb121
-
-bb120: ; preds = %bb116
- unreachable
-
-bb121: ; preds = %bb116
- unreachable
-
-bb141: ; preds = %bb114
- br i1 undef, label %bb182, label %bb143
-
-bb143: ; preds = %bb141
- br label %bb157
-
-bb144: ; preds = %bb.i.i.i843
- switch i32 undef, label %bb155 [
- i32 2, label %bb153
- i32 6, label %bb153
- i32 4, label %bb153
- ]
-
-bb153: ; preds = %bb144, %bb144, %bb144
- %indvar.next = add i32 %indvar, 1 ; <i32> [#uses=1]
- br label %bb157
-
-bb155: ; preds = %bb144
- unreachable
-
-bb157: ; preds = %bb153, %bb143
- %indvar = phi i32 [ %indvar.next, %bb153 ], [ 0, %bb143 ] ; <i32> [#uses=2]
- %0 = icmp eq i32 undef, %indvar ; <i1> [#uses=1]
- switch i16 undef, label %bb6.i841 [
- i16 9, label %_ZN4llvm4castINS_14ConstantSDNodeENS_7SDValueEEENS_10cast_rettyIT_T0_E8ret_typeERKS5_.exit
- i16 26, label %_ZN4llvm4castINS_14ConstantSDNodeENS_7SDValueEEENS_10cast_rettyIT_T0_E8ret_typeERKS5_.exit
- ]
-
-bb6.i841: ; preds = %bb157
- unreachable
-
-_ZN4llvm4castINS_14ConstantSDNodeENS_7SDValueEEENS_10cast_rettyIT_T0_E8ret_typeERKS5_.exit: ; preds = %bb157, %bb157
- br i1 undef, label %bb.i.i.i843, label %bb1.i.i.i844
-
-bb.i.i.i843: ; preds = %_ZN4llvm4castINS_14ConstantSDNodeENS_7SDValueEEENS_10cast_rettyIT_T0_E8ret_typeERKS5_.exit
- br i1 %0, label %bb158, label %bb144
-
-bb1.i.i.i844: ; preds = %_ZN4llvm4castINS_14ConstantSDNodeENS_7SDValueEEENS_10cast_rettyIT_T0_E8ret_typeERKS5_.exit
- unreachable
-
-bb158: ; preds = %bb.i.i.i843
- br i1 undef, label %bb177, label %bb176
-
-bb176: ; preds = %bb158
- unreachable
-
-bb177: ; preds = %bb158
- br i1 undef, label %bb179, label %bb178
-
-bb178: ; preds = %bb177
- unreachable
-
-bb179: ; preds = %bb177
- unreachable
-
-bb182: ; preds = %bb141
- unreachable
-
-bb242: ; preds = %bb108
- unreachable
-}
Added: llvm/trunk/test/Transforms/LoopStrengthReduce/X86/2009-11-10-LSRCrash.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/LoopStrengthReduce/X86/2009-11-10-LSRCrash.ll?rev=131002&view=auto
==============================================================================
--- llvm/trunk/test/Transforms/LoopStrengthReduce/X86/2009-11-10-LSRCrash.ll (added)
+++ llvm/trunk/test/Transforms/LoopStrengthReduce/X86/2009-11-10-LSRCrash.ll Fri May 6 13:24:46 2011
@@ -0,0 +1,130 @@
+; RUN: llc < %s -mtriple=i386-apple-darwin11
+
+define void @_ZN4llvm20SelectionDAGLowering14visitInlineAsmENS_8CallSiteE() nounwind ssp align 2 {
+entry:
+ br i1 undef, label %bb3.i, label %bb4.i
+
+bb3.i: ; preds = %entry
+ unreachable
+
+bb4.i: ; preds = %entry
+ br i1 undef, label %bb.i.i, label %_ZNK4llvm8CallSite14getCalledValueEv.exit
+
+bb.i.i: ; preds = %bb4.i
+ unreachable
+
+_ZNK4llvm8CallSite14getCalledValueEv.exit: ; preds = %bb4.i
+ br i1 undef, label %_ZN4llvm4castINS_9InlineAsmEPNS_5ValueEEENS_10cast_rettyIT_T0_E8ret_typeERKS6_.exit, label %bb6.i
+
+bb6.i: ; preds = %_ZNK4llvm8CallSite14getCalledValueEv.exit
+ unreachable
+
+_ZN4llvm4castINS_9InlineAsmEPNS_5ValueEEENS_10cast_rettyIT_T0_E8ret_typeERKS6_.exit: ; preds = %_ZNK4llvm8CallSite14getCalledValueEv.exit
+ br i1 undef, label %_ZL25hasInlineAsmMemConstraintRSt6vectorIN4llvm9InlineAsm14ConstraintInfoESaIS2_EERKNS0_14TargetLoweringE.exit, label %bb.i
+
+bb.i: ; preds = %_ZN4llvm4castINS_9InlineAsmEPNS_5ValueEEENS_10cast_rettyIT_T0_E8ret_typeERKS6_.exit
+ br label %_ZL25hasInlineAsmMemConstraintRSt6vectorIN4llvm9InlineAsm14ConstraintInfoESaIS2_EERKNS0_14TargetLoweringE.exit
+
+_ZL25hasInlineAsmMemConstraintRSt6vectorIN4llvm9InlineAsm14ConstraintInfoESaIS2_EERKNS0_14TargetLoweringE.exit: ; preds = %bb.i, %_ZN4llvm4castINS_9InlineAsmEPNS_5ValueEEENS_10cast_rettyIT_T0_E8ret_typeERKS6_.exit
+ br i1 undef, label %bb50, label %bb27
+
+bb27: ; preds = %_ZL25hasInlineAsmMemConstraintRSt6vectorIN4llvm9InlineAsm14ConstraintInfoESaIS2_EERKNS0_14TargetLoweringE.exit
+ br i1 undef, label %bb1.i727, label %bb.i.i726
+
+bb.i.i726: ; preds = %bb27
+ unreachable
+
+bb1.i727: ; preds = %bb27
+ unreachable
+
+bb50: ; preds = %_ZL25hasInlineAsmMemConstraintRSt6vectorIN4llvm9InlineAsm14ConstraintInfoESaIS2_EERKNS0_14TargetLoweringE.exit
+ br label %bb107
+
+bb51: ; preds = %bb107
+ br i1 undef, label %bb105, label %bb106
+
+bb105: ; preds = %bb51
+ unreachable
+
+bb106: ; preds = %bb51
+ br label %bb107
+
+bb107: ; preds = %bb106, %bb50
+ br i1 undef, label %bb108, label %bb51
+
+bb108: ; preds = %bb107
+ br i1 undef, label %bb242, label %bb114
+
+bb114: ; preds = %bb108
+ br i1 undef, label %bb141, label %bb116
+
+bb116: ; preds = %bb114
+ br i1 undef, label %bb120, label %bb121
+
+bb120: ; preds = %bb116
+ unreachable
+
+bb121: ; preds = %bb116
+ unreachable
+
+bb141: ; preds = %bb114
+ br i1 undef, label %bb182, label %bb143
+
+bb143: ; preds = %bb141
+ br label %bb157
+
+bb144: ; preds = %bb.i.i.i843
+ switch i32 undef, label %bb155 [
+ i32 2, label %bb153
+ i32 6, label %bb153
+ i32 4, label %bb153
+ ]
+
+bb153: ; preds = %bb144, %bb144, %bb144
+ %indvar.next = add i32 %indvar, 1 ; <i32> [#uses=1]
+ br label %bb157
+
+bb155: ; preds = %bb144
+ unreachable
+
+bb157: ; preds = %bb153, %bb143
+ %indvar = phi i32 [ %indvar.next, %bb153 ], [ 0, %bb143 ] ; <i32> [#uses=2]
+ %0 = icmp eq i32 undef, %indvar ; <i1> [#uses=1]
+ switch i16 undef, label %bb6.i841 [
+ i16 9, label %_ZN4llvm4castINS_14ConstantSDNodeENS_7SDValueEEENS_10cast_rettyIT_T0_E8ret_typeERKS5_.exit
+ i16 26, label %_ZN4llvm4castINS_14ConstantSDNodeENS_7SDValueEEENS_10cast_rettyIT_T0_E8ret_typeERKS5_.exit
+ ]
+
+bb6.i841: ; preds = %bb157
+ unreachable
+
+_ZN4llvm4castINS_14ConstantSDNodeENS_7SDValueEEENS_10cast_rettyIT_T0_E8ret_typeERKS5_.exit: ; preds = %bb157, %bb157
+ br i1 undef, label %bb.i.i.i843, label %bb1.i.i.i844
+
+bb.i.i.i843: ; preds = %_ZN4llvm4castINS_14ConstantSDNodeENS_7SDValueEEENS_10cast_rettyIT_T0_E8ret_typeERKS5_.exit
+ br i1 %0, label %bb158, label %bb144
+
+bb1.i.i.i844: ; preds = %_ZN4llvm4castINS_14ConstantSDNodeENS_7SDValueEEENS_10cast_rettyIT_T0_E8ret_typeERKS5_.exit
+ unreachable
+
+bb158: ; preds = %bb.i.i.i843
+ br i1 undef, label %bb177, label %bb176
+
+bb176: ; preds = %bb158
+ unreachable
+
+bb177: ; preds = %bb158
+ br i1 undef, label %bb179, label %bb178
+
+bb178: ; preds = %bb177
+ unreachable
+
+bb179: ; preds = %bb177
+ unreachable
+
+bb182: ; preds = %bb141
+ unreachable
+
+bb242: ; preds = %bb108
+ unreachable
+}
Added: llvm/trunk/test/Transforms/LoopStrengthReduce/X86/dg.exp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/LoopStrengthReduce/X86/dg.exp?rev=131002&view=auto
==============================================================================
--- llvm/trunk/test/Transforms/LoopStrengthReduce/X86/dg.exp (added)
+++ llvm/trunk/test/Transforms/LoopStrengthReduce/X86/dg.exp Fri May 6 13:24:46 2011
@@ -0,0 +1,5 @@
+load_lib llvm.exp
+
+if { [llvm_supports_target X86] } {
+ RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll}]]
+}
Added: llvm/trunk/test/Transforms/TailDup/X86/dg.exp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/TailDup/X86/dg.exp?rev=131002&view=auto
==============================================================================
--- llvm/trunk/test/Transforms/TailDup/X86/dg.exp (added)
+++ llvm/trunk/test/Transforms/TailDup/X86/dg.exp Fri May 6 13:24:46 2011
@@ -0,0 +1,5 @@
+load_lib llvm.exp
+
+if { [llvm_supports_target X86] } {
+ RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll}]]
+}
Added: llvm/trunk/test/Transforms/TailDup/X86/if-tail-dup.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/TailDup/X86/if-tail-dup.ll?rev=131002&view=auto
==============================================================================
--- llvm/trunk/test/Transforms/TailDup/X86/if-tail-dup.ll (added)
+++ llvm/trunk/test/Transforms/TailDup/X86/if-tail-dup.ll Fri May 6 13:24:46 2011
@@ -0,0 +1,49 @@
+; RUN: opt < %s -tailduplicate | \
+; RUN: llc -march=x86 -o %t
+; RUN: grep {\\\<je\\\>} %t
+; RUN: not grep jmp %t
+; END.
+; This should have no unconditional jumps in it. The C source is:
+
+;void foo(int c, int* P) {
+; if (c & 1) P[0] = 1;
+; if (c & 2) P[1] = 1;
+; if (c & 4) P[2] = 1;
+; if (c & 8) P[3] = 1;
+;}
+
+define void @foo(i32 %c, i32* %P) {
+entry:
+ %tmp1 = and i32 %c, 1 ; <i32> [#uses=1]
+ %tmp1.upgrd.1 = icmp eq i32 %tmp1, 0 ; <i1> [#uses=1]
+ br i1 %tmp1.upgrd.1, label %cond_next, label %cond_true
+cond_true: ; preds = %entry
+ store i32 1, i32* %P
+ br label %cond_next
+cond_next: ; preds = %cond_true, %entry
+ %tmp5 = and i32 %c, 2 ; <i32> [#uses=1]
+ %tmp5.upgrd.2 = icmp eq i32 %tmp5, 0 ; <i1> [#uses=1]
+ br i1 %tmp5.upgrd.2, label %cond_next10, label %cond_true6
+cond_true6: ; preds = %cond_next
+ %tmp8 = getelementptr i32* %P, i32 1 ; <i32*> [#uses=1]
+ store i32 1, i32* %tmp8
+ br label %cond_next10
+cond_next10: ; preds = %cond_true6, %cond_next
+ %tmp13 = and i32 %c, 4 ; <i32> [#uses=1]
+ %tmp13.upgrd.3 = icmp eq i32 %tmp13, 0 ; <i1> [#uses=1]
+ br i1 %tmp13.upgrd.3, label %cond_next18, label %cond_true14
+cond_true14: ; preds = %cond_next10
+ %tmp16 = getelementptr i32* %P, i32 2 ; <i32*> [#uses=1]
+ store i32 1, i32* %tmp16
+ br label %cond_next18
+cond_next18: ; preds = %cond_true14, %cond_next10
+ %tmp21 = and i32 %c, 8 ; <i32> [#uses=1]
+ %tmp21.upgrd.4 = icmp eq i32 %tmp21, 0 ; <i1> [#uses=1]
+ br i1 %tmp21.upgrd.4, label %return, label %cond_true22
+cond_true22: ; preds = %cond_next18
+ %tmp24 = getelementptr i32* %P, i32 3 ; <i32*> [#uses=1]
+ store i32 1, i32* %tmp24
+ ret void
+return: ; preds = %cond_next18
+ ret void
+}
Removed: llvm/trunk/test/Transforms/TailDup/if-tail-dup.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/TailDup/if-tail-dup.ll?rev=131001&view=auto
==============================================================================
--- llvm/trunk/test/Transforms/TailDup/if-tail-dup.ll (original)
+++ llvm/trunk/test/Transforms/TailDup/if-tail-dup.ll (removed)
@@ -1,49 +0,0 @@
-; RUN: opt < %s -tailduplicate | \
-; RUN: llc -march=x86 -o %t
-; RUN: grep {\\\<je\\\>} %t
-; RUN: not grep jmp %t
-; END.
-; This should have no unconditional jumps in it. The C source is:
-
-;void foo(int c, int* P) {
-; if (c & 1) P[0] = 1;
-; if (c & 2) P[1] = 1;
-; if (c & 4) P[2] = 1;
-; if (c & 8) P[3] = 1;
-;}
-
-define void @foo(i32 %c, i32* %P) {
-entry:
- %tmp1 = and i32 %c, 1 ; <i32> [#uses=1]
- %tmp1.upgrd.1 = icmp eq i32 %tmp1, 0 ; <i1> [#uses=1]
- br i1 %tmp1.upgrd.1, label %cond_next, label %cond_true
-cond_true: ; preds = %entry
- store i32 1, i32* %P
- br label %cond_next
-cond_next: ; preds = %cond_true, %entry
- %tmp5 = and i32 %c, 2 ; <i32> [#uses=1]
- %tmp5.upgrd.2 = icmp eq i32 %tmp5, 0 ; <i1> [#uses=1]
- br i1 %tmp5.upgrd.2, label %cond_next10, label %cond_true6
-cond_true6: ; preds = %cond_next
- %tmp8 = getelementptr i32* %P, i32 1 ; <i32*> [#uses=1]
- store i32 1, i32* %tmp8
- br label %cond_next10
-cond_next10: ; preds = %cond_true6, %cond_next
- %tmp13 = and i32 %c, 4 ; <i32> [#uses=1]
- %tmp13.upgrd.3 = icmp eq i32 %tmp13, 0 ; <i1> [#uses=1]
- br i1 %tmp13.upgrd.3, label %cond_next18, label %cond_true14
-cond_true14: ; preds = %cond_next10
- %tmp16 = getelementptr i32* %P, i32 2 ; <i32*> [#uses=1]
- store i32 1, i32* %tmp16
- br label %cond_next18
-cond_next18: ; preds = %cond_true14, %cond_next10
- %tmp21 = and i32 %c, 8 ; <i32> [#uses=1]
- %tmp21.upgrd.4 = icmp eq i32 %tmp21, 0 ; <i1> [#uses=1]
- br i1 %tmp21.upgrd.4, label %return, label %cond_true22
-cond_true22: ; preds = %cond_next18
- %tmp24 = getelementptr i32* %P, i32 3 ; <i32*> [#uses=1]
- store i32 1, i32* %tmp24
- ret void
-return: ; preds = %cond_next18
- ret void
-}
More information about the llvm-commits
mailing list