diff options
author | Dan Gohman <gohman@apple.com> | 2010-06-24 15:24:03 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2010-06-24 15:24:03 +0000 |
commit | 463f26b4be5c281da6f4f970b0477d89c1206dc1 (patch) | |
tree | 868f14334cd7f75827a8b56710c5fba3c8d86b67 /llvm/test/CodeGen/X86 | |
parent | df6b33e77887ca1f70275718bf4abd50daad9501 (diff) | |
download | bcm5719-llvm-463f26b4be5c281da6f4f970b0477d89c1206dc1.tar.gz bcm5719-llvm-463f26b4be5c281da6f4f970b0477d89c1206dc1.zip |
Eliminate the other half of the BRCOND optimization, and update
as many tests as possible.
llvm-svn: 106749
Diffstat (limited to 'llvm/test/CodeGen/X86')
-rw-r--r-- | llvm/test/CodeGen/X86/2008-03-18-CoalescerBug.ll | 2 | ||||
-rw-r--r-- | llvm/test/CodeGen/X86/2008-04-09-BranchFolding.ll | 2 | ||||
-rw-r--r-- | llvm/test/CodeGen/X86/2008-08-23-X86-64AsmBug.ll | 8 | ||||
-rw-r--r-- | llvm/test/CodeGen/X86/2009-01-12-CoalescerBug.ll | 84 | ||||
-rw-r--r-- | llvm/test/CodeGen/X86/2009-09-07-CoalescerBug.ll | 47 | ||||
-rw-r--r-- | llvm/test/CodeGen/X86/2009-09-19-SchedCustomLoweringBug.ll | 29 | ||||
-rw-r--r-- | llvm/test/CodeGen/X86/2009-12-12-CoalescerBug.ll | 40 | ||||
-rw-r--r-- | llvm/test/CodeGen/X86/loop-strength-reduce6.ll | 18 |
8 files changed, 15 insertions, 215 deletions
diff --git a/llvm/test/CodeGen/X86/2008-03-18-CoalescerBug.ll b/llvm/test/CodeGen/X86/2008-03-18-CoalescerBug.ll index ccc4d754c1f..3ae50261972 100644 --- a/llvm/test/CodeGen/X86/2008-03-18-CoalescerBug.ll +++ b/llvm/test/CodeGen/X86/2008-03-18-CoalescerBug.ll @@ -19,7 +19,7 @@ bb33: ; preds = %entry br i1 %tmp35, label %bb38, label %bb87.preheader bb38: ; preds = %bb33 %tmp53 = add i32 %tmp19, %delta ; <i32> [#uses=2] - br i1 false, label %bb50, label %bb43 + br label %bb43 bb43: ; preds = %bb38 store i32 %tmp53, i32* null, align 4 ret void diff --git a/llvm/test/CodeGen/X86/2008-04-09-BranchFolding.ll b/llvm/test/CodeGen/X86/2008-04-09-BranchFolding.ll index 41fbdd19f2b..f4b2d719ae1 100644 --- a/llvm/test/CodeGen/X86/2008-04-09-BranchFolding.ll +++ b/llvm/test/CodeGen/X86/2008-04-09-BranchFolding.ll @@ -10,7 +10,7 @@ define fastcc %struct.tree_node* @pushdecl(%struct.tree_node* %x) nounwind { entry: %tmp3.i40 = icmp eq %struct.binding_level* null, null ; <i1> [#uses=2] - br i1 false, label %bb143, label %bb140 + br label %bb140 bb140: ; preds = %entry br i1 %tmp3.i40, label %bb160, label %bb17.i bb17.i: ; preds = %bb140 diff --git a/llvm/test/CodeGen/X86/2008-08-23-X86-64AsmBug.ll b/llvm/test/CodeGen/X86/2008-08-23-X86-64AsmBug.ll index eacb4a51c21..ce9e389fb35 100644 --- a/llvm/test/CodeGen/X86/2008-08-23-X86-64AsmBug.ll +++ b/llvm/test/CodeGen/X86/2008-08-23-X86-64AsmBug.ll @@ -7,7 +7,7 @@ define double @_Z7qstrtodPKcPS0_Pb(i8* %s00, i8** %se, i8* %ok) nounwind { entry: - br i1 false, label %bb151, label %bb163 + br label %bb163 bb151: ; preds = %entry br label %bb163 @@ -19,13 +19,13 @@ bb163: ; preds = %bb151, %entry br label %bb5.i bb5.i: ; preds = %bb5.i57.i, %bb163 - %b.0.i = phi %struct.Bigint* [ null, %bb163 ], [ %tmp9.i.i41.i, %bb5.i57.i ] ; <%struct.Bigint*> [#uses=1] + %b.0.i = phi %struct.Bigint* [ null, %bb163 ] ; <%struct.Bigint*> [#uses=1] %tmp3.i7.i728 = load i32* null, align 4 ; <i32> [#uses=1] br label %bb.i27.i bb.i27.i: ; preds = %bb.i27.i, %bb5.i %tmp23.i20.i = lshr i32 0, 16 ; <i32> [#uses=1] - br i1 false, label %bb.i27.i, label %bb5.i57.i + br label %bb5.i57.i bb5.i57.i: ; preds = %bb.i27.i %tmp50.i35.i = load i32* null, align 4 ; <i32> [#uses=1] @@ -41,7 +41,7 @@ bb5.i57.i: ; preds = %bb.i27.i store i32 %tmp23.i20.i, i32* null, align 4 %tmp74.i61.i = add i32 %tmp3.i7.i728, 1 ; <i32> [#uses=1] store i32 %tmp74.i61.i, i32* null, align 4 - br i1 false, label %bb5.i, label %bb7.i + br label %bb7.i bb7.i: ; preds = %bb5.i57.i %tmp514 = load i32* null, align 4 ; <i32> [#uses=1] diff --git a/llvm/test/CodeGen/X86/2009-01-12-CoalescerBug.ll b/llvm/test/CodeGen/X86/2009-01-12-CoalescerBug.ll deleted file mode 100644 index 27a7113ffd5..00000000000 --- a/llvm/test/CodeGen/X86/2009-01-12-CoalescerBug.ll +++ /dev/null @@ -1,84 +0,0 @@ -; RUN: llc < %s -mtriple=x86_64-unknown-linux-gnu | grep movq | count 2 -; PR3311 - - %struct.CUMULATIVE_ARGS = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 } - %struct.VEC_basic_block_base = type { i32, i32, [1 x %struct.basic_block_def*] } - %struct.VEC_basic_block_gc = type { %struct.VEC_basic_block_base } - %struct.VEC_edge_base = type { i32, i32, [1 x %struct.edge_def*] } - %struct.VEC_edge_gc = type { %struct.VEC_edge_base } - %struct.VEC_rtx_base = type { i32, i32, [1 x %struct.rtx_def*] } - %struct.VEC_rtx_gc = type { %struct.VEC_rtx_base } - %struct.VEC_temp_slot_p_base = type { i32, i32, [1 x %struct.temp_slot*] } - %struct.VEC_temp_slot_p_gc = type { %struct.VEC_temp_slot_p_base } - %struct.VEC_tree_base = type { i32, i32, [1 x %struct.tree_node*] } - %struct.VEC_tree_gc = type { %struct.VEC_tree_base } - %struct._obstack_chunk = type { i8*, %struct._obstack_chunk*, [4 x i8] } - %struct.basic_block_def = type { %struct.tree_node*, %struct.VEC_edge_gc*, %struct.VEC_edge_gc*, i8*, %struct.loop*, [2 x %struct.et_node*], %struct.basic_block_def*, %struct.basic_block_def*, %struct.basic_block_il_dependent, %struct.tree_node*, %struct.edge_prediction*, i64, i32, i32, i32, i32 } - %struct.basic_block_il_dependent = type { %struct.rtl_bb_info* } - %struct.bitmap_element_def = type { %struct.bitmap_element_def*, %struct.bitmap_element_def*, i32, [2 x i64] } - %struct.bitmap_head_def = type { %struct.bitmap_element_def*, %struct.bitmap_element_def*, i32, %struct.bitmap_obstack* } - %struct.bitmap_obstack = type { %struct.bitmap_element_def*, %struct.bitmap_head_def*, %struct.obstack } - %struct.block_symbol = type { [3 x %struct.rtunion], %struct.object_block*, i64 } - %struct.c_arg_info = type { %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, i8 } - %struct.c_language_function = type { %struct.stmt_tree_s } - %struct.c_switch = type opaque - %struct.control_flow_graph = type { %struct.basic_block_def*, %struct.basic_block_def*, %struct.VEC_basic_block_gc*, i32, i32, i32, %struct.VEC_basic_block_gc*, i32 } - %struct.edge_def = type { %struct.basic_block_def*, %struct.basic_block_def*, %struct.edge_def_insns, i8*, %struct.location_t*, i32, i32, i64, i32 } - %struct.edge_def_insns = type { %struct.rtx_def* } - %struct.edge_prediction = type opaque - %struct.eh_status = type opaque - %struct.emit_status = type { i32, i32, %struct.rtx_def*, %struct.rtx_def*, %struct.sequence_stack*, i32, %struct.location_t, i32, i8*, %struct.rtx_def** } - %struct.et_node = type opaque - %struct.expr_status = type { i32, i32, i32, %struct.rtx_def*, %struct.rtx_def*, %struct.rtx_def* } - %struct.function = type { %struct.eh_status*, %struct.expr_status*, %struct.emit_status*, %struct.varasm_status*, %struct.control_flow_graph*, %struct.tree_node*, %struct.function*, i32, i32, i32, i32, %struct.rtx_def*, %struct.CUMULATIVE_ARGS, %struct.rtx_def*, %struct.rtx_def*, %struct.initial_value_struct*, %struct.rtx_def*, %struct.rtx_def*, %struct.rtx_def*, %struct.rtx_def*, %struct.rtx_def*, %struct.rtx_def*, i8, i32, i64, %struct.tree_node*, %struct.tree_node*, %struct.rtx_def*, %struct.VEC_temp_slot_p_gc*, %struct.temp_slot*, %struct.var_refs_queue*, i32, i32, i32, i32, %struct.machine_function*, i32, i32, %struct.language_function*, %struct.htab*, %struct.rtx_def*, i32, i32, i32, %struct.location_t, %struct.VEC_tree_gc*, %struct.tree_node*, i8*, i8*, i8*, i8*, i8*, %struct.tree_node*, i8, i8, i8, i8, i8, i8 } - %struct.htab = type { i32 (i8*)*, i32 (i8*, i8*)*, void (i8*)*, i8**, i64, i64, i64, i32, i32, i8* (i64, i64)*, void (i8*)*, i8*, i8* (i8*, i64, i64)*, void (i8*, i8*)*, i32 } - %struct.initial_value_struct = type opaque - %struct.lang_decl = type { i8 } - %struct.language_function = type { %struct.c_language_function, %struct.tree_node*, %struct.tree_node*, %struct.c_switch*, %struct.c_arg_info*, i32, i32, i32, i32 } - %struct.location_t = type { i8*, i32 } - %struct.loop = type opaque - %struct.machine_function = type { %struct.stack_local_entry*, i8*, %struct.rtx_def*, i32, i32, [4 x i32], i32, i32, i32 } - %struct.object_block = type { %struct.section*, i32, i64, %struct.VEC_rtx_gc*, %struct.VEC_rtx_gc* } - %struct.obstack = type { i64, %struct._obstack_chunk*, i8*, i8*, i8*, i64, i32, %struct._obstack_chunk* (i8*, i64)*, void (i8*, %struct._obstack_chunk*)*, i8*, i8 } - %struct.omp_clause_subcode = type { i32 } - %struct.rtl_bb_info = type { %struct.rtx_def*, %struct.rtx_def*, %struct.bitmap_head_def*, %struct.bitmap_head_def*, %struct.rtx_def*, %struct.rtx_def*, i32 } - %struct.rtunion = type { i8* } - %struct.rtx_def = type { i16, i8, i8, %struct.u } - %struct.section = type { %struct.unnamed_section } - %struct.sequence_stack = type { %struct.rtx_def*, %struct.rtx_def*, %struct.sequence_stack* } - %struct.stack_local_entry = type opaque - %struct.stmt_tree_s = type { %struct.tree_node*, i32 } - %struct.temp_slot = type opaque - %struct.tree_common = type { %struct.tree_node*, %struct.tree_node*, %union.tree_ann_d*, i8, i8, i8, i8, i8 } - %struct.tree_decl_common = type { %struct.tree_decl_minimal, %struct.tree_node*, i8, i8, i8, i8, i8, i32, i32, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, i64, %struct.lang_decl* } - %struct.tree_decl_minimal = type { %struct.tree_common, %struct.location_t, i32, %struct.tree_node*, %struct.tree_node* } - %struct.tree_decl_non_common = type { %struct.tree_decl_with_vis, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.tree_node* } - %struct.tree_decl_with_rtl = type { %struct.tree_decl_common, %struct.rtx_def*, i32 } - %struct.tree_decl_with_vis = type { %struct.tree_decl_with_rtl, %struct.tree_node*, %struct.tree_node*, i8, i8, i8, i8 } - %struct.tree_function_decl = type { %struct.tree_decl_non_common, i32, i8, i8, i64, %struct.function* } - %struct.tree_node = type { %struct.tree_function_decl } - %struct.u = type { %struct.block_symbol } - %struct.unnamed_section = type { %struct.omp_clause_subcode, void (i8*)*, i8*, %struct.section* } - %struct.var_refs_queue = type { %struct.rtx_def*, i32, i32, %struct.var_refs_queue* } - %struct.varasm_status = type opaque - %union.tree_ann_d = type opaque -@.str1 = external constant [31 x i8] ; <[31 x i8]*> [#uses=1] -@integer_types = external global [11 x %struct.tree_node*] ; <[11 x %struct.tree_node*]*> [#uses=1] -@__FUNCTION__.31164 = external constant [23 x i8], align 16 ; <[23 x i8]*> [#uses=1] -@llvm.used = appending global [1 x i8*] [ i8* bitcast (i32 (i32, i32)* @c_common_type_for_size to i8*) ], section "llvm.metadata" ; <[1 x i8*]*> [#uses=0] - -define i32 @c_common_type_for_size(i32 %bits, i32 %unsignedp) nounwind { -entry: - %0 = load %struct.tree_node** getelementptr ([11 x %struct.tree_node*]* @integer_types, i32 0, i64 5), align 8 ; <%struct.tree_node*> [#uses=1] - br i1 false, label %bb16, label %bb - -bb: ; preds = %entry - tail call void @tree_class_check_failed(%struct.tree_node* %0, i32 2, i8* getelementptr ([31 x i8]* @.str1, i32 0, i64 0), i32 1785, i8* getelementptr ([23 x i8]* @__FUNCTION__.31164, i32 0, i32 0)) noreturn nounwind - unreachable - -bb16: ; preds = %entry - %tmp = add i32 %bits, %unsignedp ; <i32> [#uses=1] - ret i32 %tmp -} - -declare void @tree_class_check_failed(%struct.tree_node*, i32, i8*, i32, i8*) noreturn diff --git a/llvm/test/CodeGen/X86/2009-09-07-CoalescerBug.ll b/llvm/test/CodeGen/X86/2009-09-07-CoalescerBug.ll deleted file mode 100644 index 41b4bc08727..00000000000 --- a/llvm/test/CodeGen/X86/2009-09-07-CoalescerBug.ll +++ /dev/null @@ -1,47 +0,0 @@ -; RUN: llc < %s -mtriple=x86_64-unknown-freebsd7.2 -code-model=kernel | FileCheck %s -; PR4689 - -%struct.__s = type { [8 x i8] } -%struct.pcb = type { i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i16, i8* } -%struct.pcpu = type { i32*, i32*, i32*, i32*, %struct.pcb*, i64, i32, i32, i32, i32 } - -define i64 @hammer_time(i64 %modulep, i64 %physfree) nounwind ssp noredzone noimplicitfloat { -; CHECK: hammer_time: -; CHECK: movq $Xrsvd, %rax -; CHECK: movq $Xrsvd, %rcx -entry: - br i1 undef, label %if.then, label %if.end - -if.then: ; preds = %entry - br label %if.end - -if.end: ; preds = %if.then, %entry - br label %for.body - -for.body: ; preds = %for.inc, %if.end - switch i32 undef, label %if.then76 [ - i32 9, label %for.inc - i32 10, label %for.inc - i32 11, label %for.inc - i32 12, label %for.inc - ] - -if.then76: ; preds = %for.body - unreachable - -for.inc: ; preds = %for.body, %for.body, %for.body, %for.body - br i1 undef, label %for.end, label %for.body - -for.end: ; preds = %for.inc - call void asm sideeffect "mov $1,%gs:$0", "=*m,r,~{dirflag},~{fpsr},~{flags}"(%struct.__s* bitcast (%struct.pcb** getelementptr (%struct.pcpu* null, i32 0, i32 4) to %struct.__s*), i64 undef) nounwind - br label %for.body170 - -for.body170: ; preds = %for.body170, %for.end - store i64 or (i64 and (i64 or (i64 ptrtoint (void (i32, i32, i32, i32)* @Xrsvd to i64), i64 2097152), i64 2162687), i64 or (i64 or (i64 and (i64 shl (i64 ptrtoint (void (i32, i32, i32, i32)* @Xrsvd to i64), i64 32), i64 -281474976710656), i64 140737488355328), i64 15393162788864)), i64* undef - br i1 undef, label %for.end175, label %for.body170 - -for.end175: ; preds = %for.body170 - unreachable -} - -declare void @Xrsvd(i32, i32, i32, i32) ssp noredzone noimplicitfloat diff --git a/llvm/test/CodeGen/X86/2009-09-19-SchedCustomLoweringBug.ll b/llvm/test/CodeGen/X86/2009-09-19-SchedCustomLoweringBug.ll deleted file mode 100644 index 8cb538b0735..00000000000 --- a/llvm/test/CodeGen/X86/2009-09-19-SchedCustomLoweringBug.ll +++ /dev/null @@ -1,29 +0,0 @@ -; RUN: llc < %s -mtriple=i386-apple-darwin10 -post-RA-scheduler=true | FileCheck %s - -; PR4958 - -define i32 @main() nounwind ssp { -entry: -; CHECK: main: - %"alloca point" = bitcast i32 0 to i32 ; <i32> [#uses=0] - br label %bb - -bb: ; preds = %bb1, %entry -; CHECK: addl $1 -; CHECK-NEXT: movl %e -; CHECK-NEXT: adcl $0 - %i.0 = phi i64 [ 0, %entry ], [ %0, %bb1 ] ; <i64> [#uses=1] - %0 = add nsw i64 %i.0, 1 ; <i64> [#uses=2] - %1 = icmp sgt i32 0, 0 ; <i1> [#uses=1] - br i1 %1, label %bb2, label %bb1 - -bb1: ; preds = %bb - %2 = icmp sle i64 %0, 1 ; <i1> [#uses=1] - br i1 %2, label %bb, label %bb2 - -bb2: ; preds = %bb1, %bb - br label %return - -return: ; preds = %bb2 - ret i32 0 -} diff --git a/llvm/test/CodeGen/X86/2009-12-12-CoalescerBug.ll b/llvm/test/CodeGen/X86/2009-12-12-CoalescerBug.ll deleted file mode 100644 index 4e8f5fdc530..00000000000 --- a/llvm/test/CodeGen/X86/2009-12-12-CoalescerBug.ll +++ /dev/null @@ -1,40 +0,0 @@ -; RUN: llc < %s -mtriple=i386-apple-darwin | FileCheck %s - -define i32 @do_loop(i32* nocapture %sdp, i32* nocapture %ddp, i8* %mdp, i8* nocapture %cdp, i32 %w) nounwind readonly optsize ssp { -entry: - br label %bb - -bb: ; preds = %bb5, %entry - %mask.1.in = load i8* undef, align 1 ; <i8> [#uses=3] - %0 = icmp eq i8 %mask.1.in, 0 ; <i1> [#uses=1] - br i1 %0, label %bb5, label %bb1 - -bb1: ; preds = %bb - br i1 undef, label %bb2, label %bb3 - -bb2: ; preds = %bb1 -; CHECK: %bb2 -; CHECK: movb %ch, %al - %1 = zext i8 %mask.1.in to i32 ; <i32> [#uses=1] - %2 = zext i8 undef to i32 ; <i32> [#uses=1] - %3 = mul i32 %2, %1 ; <i32> [#uses=1] - %4 = add i32 %3, 1 ; <i32> [#uses=1] - %5 = add i32 %4, 0 ; <i32> [#uses=1] - %6 = lshr i32 %5, 8 ; <i32> [#uses=1] - %retval12.i = trunc i32 %6 to i8 ; <i8> [#uses=1] - br label %bb3 - -bb3: ; preds = %bb2, %bb1 - %mask.0.in = phi i8 [ %retval12.i, %bb2 ], [ %mask.1.in, %bb1 ] ; <i8> [#uses=1] - %7 = icmp eq i8 %mask.0.in, 0 ; <i1> [#uses=1] - br i1 %7, label %bb5, label %bb4 - -bb4: ; preds = %bb3 - br label %bb5 - -bb5: ; preds = %bb4, %bb3, %bb - br i1 undef, label %bb6, label %bb - -bb6: ; preds = %bb5 - ret i32 undef -} diff --git a/llvm/test/CodeGen/X86/loop-strength-reduce6.ll b/llvm/test/CodeGen/X86/loop-strength-reduce6.ll index bbafcf7cbc7..919f836841f 100644 --- a/llvm/test/CodeGen/X86/loop-strength-reduce6.ll +++ b/llvm/test/CodeGen/X86/loop-strength-reduce6.ll @@ -2,22 +2,22 @@ define fastcc i32 @decodeMP3(i32 %isize, i32* %done) nounwind { entry: - br i1 false, label %cond_next191, label %cond_true189 + br label %cond_true189 cond_true189: ; preds = %entry ret i32 0 cond_next191: ; preds = %entry - br i1 false, label %cond_next37.i, label %cond_false.i9 + br label %cond_false.i9 cond_false.i9: ; preds = %cond_next191 ret i32 0 cond_next37.i: ; preds = %cond_next191 - br i1 false, label %cond_false50.i, label %cond_true44.i + br label %cond_true44.i cond_true44.i: ; preds = %cond_next37.i - br i1 false, label %cond_true11.i.i, label %bb414.preheader.i + br label %bb414.preheader.i cond_true11.i.i: ; preds = %cond_true44.i ret i32 0 @@ -26,19 +26,19 @@ cond_false50.i: ; preds = %cond_next37.i ret i32 0 bb414.preheader.i: ; preds = %cond_true44.i - br i1 false, label %bb.i18, label %do_layer3.exit + br label %do_layer3.exit bb.i18: ; preds = %bb414.preheader.i - br i1 false, label %bb358.i, label %cond_true79.i + br label %cond_true79.i cond_true79.i: ; preds = %bb.i18 ret i32 0 bb331.i: ; preds = %bb358.i, %cond_true.i149.i - br i1 false, label %cond_true.i149.i, label %cond_false.i151.i + br label %cond_false.i151.i cond_true.i149.i: ; preds = %bb331.i - br i1 false, label %bb178.preheader.i.i, label %bb331.i + br label %bb331.i cond_false.i151.i: ; preds = %bb331.i ret i32 0 @@ -56,7 +56,7 @@ bb178.preheader.i.i: ; preds = %bb163.i.i, %cond_true.i149.i br label %bb163.i.i bb358.i: ; preds = %bb.i18 - br i1 false, label %bb331.i, label %bb406.i + br label %bb406.i bb406.i: ; preds = %bb358.i ret i32 0 |