1 ; RUN: opt < %s -inline -reassociate -loop-rotate -loop-index-split -indvars -simplifycfg -verify
4 target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128"
5 %struct.CUMULATIVE_ARGS = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }
6 %struct.VEC_basic_block_base = type { i32, i32, [1 x %struct.basic_block_def*] }
7 %struct.VEC_basic_block_gc = type { %struct.VEC_basic_block_base }
8 %struct.VEC_edge_base = type { i32, i32, [1 x %struct.edge_def*] }
9 %struct.VEC_edge_gc = type { %struct.VEC_edge_base }
10 %struct.VEC_rtx_base = type { i32, i32, [1 x %struct.rtx_def*] }
11 %struct.VEC_rtx_gc = type { %struct.VEC_rtx_base }
12 %struct.VEC_temp_slot_p_base = type { i32, i32, [1 x %struct.temp_slot*] }
13 %struct.VEC_temp_slot_p_gc = type { %struct.VEC_temp_slot_p_base }
14 %struct.VEC_tree_base = type { i32, i32, [1 x %struct.tree_node*] }
15 %struct.VEC_tree_gc = type { %struct.VEC_tree_base }
16 %struct.__sbuf = type { i8*, i32 }
17 %struct._obstack_chunk = type { i8*, %struct._obstack_chunk*, [4 x i8] }
18 %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 }
19 %struct.basic_block_il_dependent = type { %struct.rtl_bb_info* }
20 %struct.bitmap_element_def = type { %struct.bitmap_element_def*, %struct.bitmap_element_def*, i32, [2 x i64] }
21 %struct.bitmap_head_def = type { %struct.bitmap_element_def*, %struct.bitmap_element_def*, i32, %struct.bitmap_obstack* }
22 %struct.bitmap_obstack = type { %struct.bitmap_element_def*, %struct.bitmap_head_def*, %struct.obstack }
23 %struct.block_symbol = type { [3 x %struct.rtunion], %struct.object_block*, i64 }
24 %struct.case_node = type { %struct.case_node*, %struct.case_node*, %struct.case_node*, %struct.tree_node*, %struct.tree_node*, %struct.tree_node* }
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.__sbuf*, 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.__sbuf, 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*, 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, %struct.__sbuf, %struct.VEC_tree_gc*, %struct.tree_node*, i8*, i8*, i8*, i8*, i8*, %struct.tree_node*, 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 opaque
37 %struct.language_function = type opaque
38 %struct.loop = type opaque
39 %struct.machine_function = type { %struct.stack_local_entry*, i8*, %struct.rtx_def*, i32, i32, [4 x i32], i32, i32, i32 }
40 %struct.object_block = type { %struct.section*, i32, i64, %struct.VEC_rtx_gc*, %struct.VEC_rtx_gc* }
41 %struct.obstack = type { i64, %struct._obstack_chunk*, i8*, i8*, i8*, i64, i32, %struct._obstack_chunk* (i8*, i64)*, void (i8*, %struct._obstack_chunk*)*, i8*, i8 }
42 %struct.omp_clause_subcode = type { i32 }
43 %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 }
44 %struct.rtunion = type { i8* }
45 %struct.rtx_def = type { i16, i8, i8, %struct.u }
46 %struct.section = type { %struct.unnamed_section }
47 %struct.sequence_stack = type { %struct.rtx_def*, %struct.rtx_def*, %struct.sequence_stack* }
48 %struct.stack_local_entry = type opaque
49 %struct.temp_slot = type opaque
50 %struct.tree_common = type { %struct.tree_node*, %struct.tree_node*, %union.tree_ann_d*, i8, i8, i8, i8 }
51 %struct.tree_decl_common = type { %struct.tree_decl_minimal, %struct.tree_node*, i8, i8, i8, i8, %struct.tree_decl_u1, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, i64, %struct.lang_decl* }
52 %struct.tree_decl_minimal = type { %struct.tree_common, %struct.__sbuf, i32, %struct.tree_node*, %struct.tree_node* }
53 %struct.tree_decl_non_common = type { %struct.tree_decl_with_vis, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.tree_node* }
54 %struct.tree_decl_u1 = type { i64 }
55 %struct.tree_decl_with_rtl = type { %struct.tree_decl_common, %struct.rtx_def* }
56 %struct.tree_decl_with_vis = type { %struct.tree_decl_with_rtl, %struct.tree_node*, %struct.tree_node*, i8, i8, i8 }
57 %struct.tree_function_decl = type { %struct.tree_decl_non_common, i8, i8, %struct.function* }
58 %struct.tree_node = type { %struct.tree_function_decl }
59 %struct.u = type { %struct.block_symbol }
60 %struct.unnamed_section = type { %struct.omp_clause_subcode, void (i8*)*, i8*, %struct.section* }
61 %struct.var_refs_queue = type { %struct.rtx_def*, i32, i32, %struct.var_refs_queue* }
62 %struct.varasm_status = type opaque
63 %union.tree_ann_d = type opaque
65 define void @emit_case_bit_tests(%struct.tree_node* %index_type, %struct.tree_node* %index_expr, %struct.tree_node* %minval, %struct.tree_node* %range, %struct.case_node* %nodes, %struct.rtx_def* %default_label) nounwind {
70 %0 = call i64 @tree_low_cst(%struct.tree_node* undef, i32 1) nounwind ; <i64> [#uses=1]
71 %1 = trunc i64 %0 to i32 ; <i32> [#uses=1]
75 %2 = icmp ugt i32 %j.0, 63 ; <i1> [#uses=1]
76 br i1 %2, label %bb11, label %bb12
79 %3 = zext i32 0 to i64 ; <i64> [#uses=0]
83 %4 = or i64 undef, undef ; <i64> [#uses=0]
86 bb14: ; preds = %bb12, %bb11
87 %5 = add i32 %j.0, 1 ; <i32> [#uses=1]
90 bb15: ; preds = %bb14, %bb
91 %j.0 = phi i32 [ %1, %bb ], [ %5, %bb14 ] ; <i32> [#uses=3]
92 %6 = icmp ugt i32 %j.0, undef ; <i1> [#uses=1]
93 br i1 %6, label %bb16, label %bb10
98 bb17: ; preds = %bb16, %entry
99 br i1 undef, label %bb18, label %bb
101 bb18: ; preds = %bb17
105 declare i64 @tree_low_cst(%struct.tree_node*, i32)
107 define void @expand_case(%struct.tree_node* %exp) nounwind {
109 br i1 undef, label %bb2, label %bb
114 bb2: ; preds = %entry
115 br i1 undef, label %bb3, label %bb4
121 br i1 undef, label %bb127, label %bb5
124 br i1 undef, label %bb6, label %bb7
130 br i1 undef, label %bb9, label %bb8
136 br i1 undef, label %bb11, label %bb10
142 br i1 undef, label %bb37, label %bb21
144 bb21: ; preds = %bb11
147 bb37: ; preds = %bb11
148 br i1 undef, label %bb38, label %bb39
150 bb38: ; preds = %bb37
153 bb39: ; preds = %bb37
154 br i1 undef, label %bb59, label %bb40
156 bb40: ; preds = %bb39
157 br i1 undef, label %bb41, label %bb59
159 bb41: ; preds = %bb40
160 br i1 undef, label %bb42, label %bb59
162 bb42: ; preds = %bb41
163 br i1 undef, label %bb43, label %bb59
165 bb43: ; preds = %bb42
166 br i1 undef, label %bb59, label %bb44
168 bb44: ; preds = %bb43
169 br i1 undef, label %bb56, label %bb58
171 bb56: ; preds = %bb44
174 bb58: ; preds = %bb44
175 call void @emit_case_bit_tests(%struct.tree_node* undef, %struct.tree_node* undef, %struct.tree_node* null, %struct.tree_node* undef, %struct.case_node* undef, %struct.rtx_def* undef) nounwind
176 br i1 undef, label %bb126, label %bb125
178 bb59: ; preds = %bb43, %bb42, %bb41, %bb40, %bb39
179 br i1 undef, label %bb70, label %bb60
181 bb60: ; preds = %bb59
184 bb70: ; preds = %bb59
187 bb125: ; preds = %bb58
190 bb126: ; preds = %bb58
193 bb127: ; preds = %bb4