Enable the new no-SP register classes by default. This is to address
[oota-llvm.git] / test / CodeGen / X86 / 2009-01-12-CoalescerBug.ll
1 ; RUN: llvm-as < %s | llc -mtriple=x86_64-unknown-linux-gnu | grep movq | count 2
2 ; PR3311
3
4         %struct.CUMULATIVE_ARGS = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }
5         %struct.VEC_basic_block_base = type { i32, i32, [1 x %struct.basic_block_def*] }
6         %struct.VEC_basic_block_gc = type { %struct.VEC_basic_block_base }
7         %struct.VEC_edge_base = type { i32, i32, [1 x %struct.edge_def*] }
8         %struct.VEC_edge_gc = type { %struct.VEC_edge_base }
9         %struct.VEC_rtx_base = type { i32, i32, [1 x %struct.rtx_def*] }
10         %struct.VEC_rtx_gc = type { %struct.VEC_rtx_base }
11         %struct.VEC_temp_slot_p_base = type { i32, i32, [1 x %struct.temp_slot*] }
12         %struct.VEC_temp_slot_p_gc = type { %struct.VEC_temp_slot_p_base }
13         %struct.VEC_tree_base = type { i32, i32, [1 x %struct.tree_node*] }
14         %struct.VEC_tree_gc = type { %struct.VEC_tree_base }
15         %struct._obstack_chunk = type { i8*, %struct._obstack_chunk*, [4 x i8] }
16         %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 }
17         %struct.basic_block_il_dependent = type { %struct.rtl_bb_info* }
18         %struct.bitmap_element_def = type { %struct.bitmap_element_def*, %struct.bitmap_element_def*, i32, [2 x i64] }
19         %struct.bitmap_head_def = type { %struct.bitmap_element_def*, %struct.bitmap_element_def*, i32, %struct.bitmap_obstack* }
20         %struct.bitmap_obstack = type { %struct.bitmap_element_def*, %struct.bitmap_head_def*, %struct.obstack }
21         %struct.block_symbol = type { [3 x %struct.rtunion], %struct.object_block*, i64 }
22         %struct.c_arg_info = type { %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, i8 }
23         %struct.c_language_function = type { %struct.stmt_tree_s }
24         %struct.c_switch = type opaque
25         %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 }
26         %struct.edge_def = type { %struct.basic_block_def*, %struct.basic_block_def*, %struct.edge_def_insns, i8*, %struct.location_t*, i32, i32, i64, i32 }
27         %struct.edge_def_insns = type { %struct.rtx_def* }
28         %struct.edge_prediction = type opaque
29         %struct.eh_status = type opaque
30         %struct.emit_status = type { i32, i32, %struct.rtx_def*, %struct.rtx_def*, %struct.sequence_stack*, i32, %struct.location_t, i32, i8*, %struct.rtx_def** }
31         %struct.et_node = type opaque
32         %struct.expr_status = type { i32, i32, i32, %struct.rtx_def*, %struct.rtx_def*, %struct.rtx_def* }
33         %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 }
34         %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 }
35         %struct.initial_value_struct = type opaque
36         %struct.lang_decl = type { i8 }
37         %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 }
38         %struct.location_t = type { i8*, i32 }
39         %struct.loop = type opaque
40         %struct.machine_function = type { %struct.stack_local_entry*, i8*, %struct.rtx_def*, i32, i32, [4 x i32], i32, i32, i32 }
41         %struct.object_block = type { %struct.section*, i32, i64, %struct.VEC_rtx_gc*, %struct.VEC_rtx_gc* }
42         %struct.obstack = type { i64, %struct._obstack_chunk*, i8*, i8*, i8*, i64, i32, %struct._obstack_chunk* (i8*, i64)*, void (i8*, %struct._obstack_chunk*)*, i8*, i8 }
43         %struct.omp_clause_subcode = type { i32 }
44         %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 }
45         %struct.rtunion = type { i8* }
46         %struct.rtx_def = type { i16, i8, i8, %struct.u }
47         %struct.section = type { %struct.unnamed_section }
48         %struct.sequence_stack = type { %struct.rtx_def*, %struct.rtx_def*, %struct.sequence_stack* }
49         %struct.stack_local_entry = type opaque
50         %struct.stmt_tree_s = type { %struct.tree_node*, i32 }
51         %struct.temp_slot = type opaque
52         %struct.tree_common = type { %struct.tree_node*, %struct.tree_node*, %union.tree_ann_d*, i8, i8, i8, i8, i8 }
53         %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* }
54         %struct.tree_decl_minimal = type { %struct.tree_common, %struct.location_t, i32, %struct.tree_node*, %struct.tree_node* }
55         %struct.tree_decl_non_common = type { %struct.tree_decl_with_vis, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.tree_node* }
56         %struct.tree_decl_with_rtl = type { %struct.tree_decl_common, %struct.rtx_def*, i32 }
57         %struct.tree_decl_with_vis = type { %struct.tree_decl_with_rtl, %struct.tree_node*, %struct.tree_node*, i8, i8, i8, i8 }
58         %struct.tree_function_decl = type { %struct.tree_decl_non_common, i32, i8, i8, i64, %struct.function* }
59         %struct.tree_node = type { %struct.tree_function_decl }
60         %struct.u = type { %struct.block_symbol }
61         %struct.unnamed_section = type { %struct.omp_clause_subcode, void (i8*)*, i8*, %struct.section* }
62         %struct.var_refs_queue = type { %struct.rtx_def*, i32, i32, %struct.var_refs_queue* }
63         %struct.varasm_status = type opaque
64         %union.tree_ann_d = type opaque
65 @.str1 = external constant [31 x i8]            ; <[31 x i8]*> [#uses=1]
66 @integer_types = external global [11 x %struct.tree_node*]              ; <[11 x %struct.tree_node*]*> [#uses=1]
67 @__FUNCTION__.31164 = external constant [23 x i8], align 16             ; <[23 x i8]*> [#uses=1]
68 @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]
69
70 define i32 @c_common_type_for_size(i32 %bits, i32 %unsignedp) nounwind {
71 entry:
72         %0 = load %struct.tree_node** getelementptr ([11 x %struct.tree_node*]* @integer_types, i32 0, i64 5), align 8          ; <%struct.tree_node*> [#uses=1]
73         br i1 false, label %bb16, label %bb
74
75 bb:             ; preds = %entry
76         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
77         unreachable
78
79 bb16:           ; preds = %entry
80         %tmp = add i32 %bits, %unsignedp                ; <i32> [#uses=1]
81         ret i32 %tmp
82 }
83
84 declare void @tree_class_check_failed(%struct.tree_node*, i32, i8*, i32, i8*) noreturn