1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s | FileCheck %s
3 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"
4 target triple = "x86_64-apple-darwin10"
6 declare void @f1() nounwind readnone
7 declare void @f2() nounwind readnone
8 declare void @f3() nounwind readnone
9 declare void @f4() nounwind readnone
10 declare void @f5() nounwind readnone
11 declare void @f6() nounwind readnone
12 declare void @f7() nounwind readnone
13 declare void @f8() nounwind readnone
14 declare void @f9() nounwind readnone
15 declare void @f10() nounwind readnone
16 declare void @f11() nounwind readnone
17 declare void @f12() nounwind readnone
18 declare void @f13() nounwind readnone
19 declare void @f14() nounwind readnone
20 declare void @f15() nounwind readnone
21 declare void @f16() nounwind readnone
22 declare void @f17() nounwind readnone
23 declare void @f18() nounwind readnone
24 declare void @f19() nounwind readnone
25 declare void @f20() nounwind readnone
26 declare void @f21() nounwind readnone
27 declare void @f22() nounwind readnone
28 declare void @f23() nounwind readnone
29 declare void @f24() nounwind readnone
30 declare void @f25() nounwind readnone
31 declare void @f26() nounwind readnone
33 define internal fastcc i32 @foo(i64 %bar) nounwind ssp {
35 ; CHECK: ## %bb.0: ## %entry
36 ; CHECK-NEXT: pushq %rax
37 ; CHECK-NEXT: addq $-2, %rdi
38 ; CHECK-NEXT: cmpq $25, %rdi
39 ; CHECK-NEXT: ja LBB0_2
40 ; CHECK-NEXT: ## %bb.1: ## %bb49
41 ; CHECK-NEXT: leaq LJTI0_0(%rip), %rax
42 ; CHECK-NEXT: movslq (%rax,%rdi,4), %rcx
43 ; CHECK-NEXT: addq %rax, %rcx
44 ; CHECK-NEXT: jmpq *%rcx
45 ; CHECK-NEXT: LBB0_3: ## %RRETURN_6
46 ; CHECK-NEXT: callq _f2
47 ; CHECK-NEXT: jmp LBB0_28
48 ; CHECK-NEXT: LBB0_18: ## %RRETURN_29
49 ; CHECK-NEXT: callq _f17
50 ; CHECK-NEXT: jmp LBB0_28
51 ; CHECK-NEXT: LBB0_16: ## %RRETURN_27
52 ; CHECK-NEXT: callq _f15
53 ; CHECK-NEXT: jmp LBB0_28
54 ; CHECK-NEXT: LBB0_13: ## %RRETURN_22
55 ; CHECK-NEXT: callq _f12
56 ; CHECK-NEXT: jmp LBB0_28
57 ; CHECK-NEXT: LBB0_6: ## %RRETURN_15
58 ; CHECK-NEXT: callq _f5
59 ; CHECK-NEXT: jmp LBB0_28
60 ; CHECK-NEXT: LBB0_14: ## %RRETURN_24
61 ; CHECK-NEXT: callq _f13
62 ; CHECK-NEXT: jmp LBB0_28
63 ; CHECK-NEXT: LBB0_11: ## %RRETURN_20
64 ; CHECK-NEXT: callq _f10
65 ; CHECK-NEXT: jmp LBB0_28
66 ; CHECK-NEXT: LBB0_27: ## %RRETURN_1
67 ; CHECK-NEXT: callq _f26
68 ; CHECK-NEXT: jmp LBB0_28
69 ; CHECK-NEXT: LBB0_26: ## %RRETURN_52
70 ; CHECK-NEXT: callq _f25
71 ; CHECK-NEXT: jmp LBB0_28
72 ; CHECK-NEXT: LBB0_4: ## %RRETURN_7
73 ; CHECK-NEXT: callq _f3
74 ; CHECK-NEXT: jmp LBB0_28
75 ; CHECK-NEXT: LBB0_17: ## %RRETURN_28
76 ; CHECK-NEXT: callq _f16
77 ; CHECK-NEXT: jmp LBB0_28
78 ; CHECK-NEXT: LBB0_5: ## %RRETURN_14
79 ; CHECK-NEXT: callq _f4
80 ; CHECK-NEXT: jmp LBB0_28
81 ; CHECK-NEXT: LBB0_9: ## %RRETURN_18
82 ; CHECK-NEXT: callq _f8
83 ; CHECK-NEXT: jmp LBB0_28
84 ; CHECK-NEXT: LBB0_19: ## %RRETURN_30
85 ; CHECK-NEXT: callq _f18
86 ; CHECK-NEXT: jmp LBB0_28
87 ; CHECK-NEXT: LBB0_22: ## %RRETURN_40
88 ; CHECK-NEXT: callq _f21
89 ; CHECK-NEXT: jmp LBB0_28
90 ; CHECK-NEXT: LBB0_7: ## %RRETURN_16
91 ; CHECK-NEXT: callq _f6
92 ; CHECK-NEXT: jmp LBB0_28
93 ; CHECK-NEXT: LBB0_23: ## %RRETURN_42
94 ; CHECK-NEXT: callq _f22
95 ; CHECK-NEXT: jmp LBB0_28
96 ; CHECK-NEXT: LBB0_15: ## %RRETURN_26
97 ; CHECK-NEXT: callq _f14
98 ; CHECK-NEXT: jmp LBB0_28
99 ; CHECK-NEXT: LBB0_8: ## %RRETURN_17
100 ; CHECK-NEXT: callq _f7
101 ; CHECK-NEXT: jmp LBB0_28
102 ; CHECK-NEXT: LBB0_20: ## %RRETURN_31
103 ; CHECK-NEXT: callq _f19
104 ; CHECK-NEXT: jmp LBB0_28
105 ; CHECK-NEXT: LBB0_12: ## %RRETURN_21
106 ; CHECK-NEXT: callq _f11
107 ; CHECK-NEXT: jmp LBB0_28
108 ; CHECK-NEXT: LBB0_10: ## %RRETURN_19
109 ; CHECK-NEXT: callq _f9
110 ; CHECK-NEXT: jmp LBB0_28
111 ; CHECK-NEXT: LBB0_24: ## %RRETURN_44
112 ; CHECK-NEXT: callq _f23
113 ; CHECK-NEXT: jmp LBB0_28
114 ; CHECK-NEXT: LBB0_21: ## %RRETURN_38
115 ; CHECK-NEXT: callq _f20
116 ; CHECK-NEXT: jmp LBB0_28
117 ; CHECK-NEXT: LBB0_25: ## %RRETURN_48
118 ; CHECK-NEXT: callq _f24
119 ; CHECK-NEXT: jmp LBB0_28
120 ; CHECK-NEXT: LBB0_2: ## %RETURN
121 ; CHECK-NEXT: callq _f1
122 ; CHECK-NEXT: LBB0_28: ## %EXIT
123 ; CHECK-NEXT: xorl %eax, %eax
124 ; CHECK-NEXT: popq %rcx
126 ; CHECK-NEXT: .p2align 2
127 ; CHECK-NEXT: .data_region jt32
128 ; CHECK-NEXT: .set L0_0_set_3, LBB0_3-LJTI0_0
129 ; CHECK-NEXT: .set L0_0_set_4, LBB0_4-LJTI0_0
130 ; CHECK-NEXT: .set L0_0_set_5, LBB0_5-LJTI0_0
131 ; CHECK-NEXT: .set L0_0_set_6, LBB0_6-LJTI0_0
132 ; CHECK-NEXT: .set L0_0_set_7, LBB0_7-LJTI0_0
133 ; CHECK-NEXT: .set L0_0_set_8, LBB0_8-LJTI0_0
134 ; CHECK-NEXT: .set L0_0_set_9, LBB0_9-LJTI0_0
135 ; CHECK-NEXT: .set L0_0_set_10, LBB0_10-LJTI0_0
136 ; CHECK-NEXT: .set L0_0_set_11, LBB0_11-LJTI0_0
137 ; CHECK-NEXT: .set L0_0_set_12, LBB0_12-LJTI0_0
138 ; CHECK-NEXT: .set L0_0_set_13, LBB0_13-LJTI0_0
139 ; CHECK-NEXT: .set L0_0_set_14, LBB0_14-LJTI0_0
140 ; CHECK-NEXT: .set L0_0_set_15, LBB0_15-LJTI0_0
141 ; CHECK-NEXT: .set L0_0_set_16, LBB0_16-LJTI0_0
142 ; CHECK-NEXT: .set L0_0_set_17, LBB0_17-LJTI0_0
143 ; CHECK-NEXT: .set L0_0_set_18, LBB0_18-LJTI0_0
144 ; CHECK-NEXT: .set L0_0_set_19, LBB0_19-LJTI0_0
145 ; CHECK-NEXT: .set L0_0_set_20, LBB0_20-LJTI0_0
146 ; CHECK-NEXT: .set L0_0_set_21, LBB0_21-LJTI0_0
147 ; CHECK-NEXT: .set L0_0_set_22, LBB0_22-LJTI0_0
148 ; CHECK-NEXT: .set L0_0_set_23, LBB0_23-LJTI0_0
149 ; CHECK-NEXT: .set L0_0_set_24, LBB0_24-LJTI0_0
150 ; CHECK-NEXT: .set L0_0_set_25, LBB0_25-LJTI0_0
151 ; CHECK-NEXT: .set L0_0_set_26, LBB0_26-LJTI0_0
152 ; CHECK-NEXT: .set L0_0_set_27, LBB0_27-LJTI0_0
153 ; CHECK-NEXT: LJTI0_0:
154 ; CHECK-NEXT: .long L0_0_set_3
155 ; CHECK-NEXT: .long L0_0_set_3
156 ; CHECK-NEXT: .long L0_0_set_4
157 ; CHECK-NEXT: .long L0_0_set_5
158 ; CHECK-NEXT: .long L0_0_set_6
159 ; CHECK-NEXT: .long L0_0_set_7
160 ; CHECK-NEXT: .long L0_0_set_8
161 ; CHECK-NEXT: .long L0_0_set_9
162 ; CHECK-NEXT: .long L0_0_set_10
163 ; CHECK-NEXT: .long L0_0_set_11
164 ; CHECK-NEXT: .long L0_0_set_12
165 ; CHECK-NEXT: .long L0_0_set_13
166 ; CHECK-NEXT: .long L0_0_set_14
167 ; CHECK-NEXT: .long L0_0_set_15
168 ; CHECK-NEXT: .long L0_0_set_16
169 ; CHECK-NEXT: .long L0_0_set_17
170 ; CHECK-NEXT: .long L0_0_set_18
171 ; CHECK-NEXT: .long L0_0_set_19
172 ; CHECK-NEXT: .long L0_0_set_20
173 ; CHECK-NEXT: .long L0_0_set_21
174 ; CHECK-NEXT: .long L0_0_set_22
175 ; CHECK-NEXT: .long L0_0_set_23
176 ; CHECK-NEXT: .long L0_0_set_24
177 ; CHECK-NEXT: .long L0_0_set_25
178 ; CHECK-NEXT: .long L0_0_set_26
179 ; CHECK-NEXT: .long L0_0_set_27
180 ; CHECK-NEXT: .end_data_region
185 switch i64 %bar, label %RETURN [
186 i64 2, label %RRETURN_2
187 i64 3, label %RRETURN_6
188 i64 4, label %RRETURN_7
189 i64 5, label %RRETURN_14
190 i64 6, label %RRETURN_15
191 i64 7, label %RRETURN_16
192 i64 8, label %RRETURN_17
193 i64 9, label %RRETURN_18
194 i64 10, label %RRETURN_19
195 i64 11, label %RRETURN_20
196 i64 12, label %RRETURN_21
197 i64 13, label %RRETURN_22
198 i64 14, label %RRETURN_24
199 i64 15, label %RRETURN_26
200 i64 16, label %RRETURN_27
201 i64 17, label %RRETURN_28
202 i64 18, label %RRETURN_29
203 i64 19, label %RRETURN_30
204 i64 20, label %RRETURN_31
205 i64 21, label %RRETURN_38
206 i64 22, label %RRETURN_40
207 i64 23, label %RRETURN_42
208 i64 24, label %RRETURN_44
209 i64 25, label %RRETURN_48
210 i64 26, label %RRETURN_52
211 i64 27, label %RRETURN_1
218 RRETURN_2: ; preds = %bb49
222 RRETURN_6: ; preds = %bb49
226 RRETURN_7: ; preds = %bb49
230 RRETURN_14: ; preds = %bb49
234 RRETURN_15: ; preds = %bb49
238 RRETURN_16: ; preds = %bb49
242 RRETURN_17: ; preds = %bb49
246 RRETURN_18: ; preds = %bb49
250 RRETURN_19: ; preds = %bb49
254 RRETURN_20: ; preds = %bb49
258 RRETURN_21: ; preds = %bb49
262 RRETURN_22: ; preds = %bb49
266 RRETURN_24: ; preds = %bb49
270 RRETURN_26: ; preds = %bb49
274 RRETURN_27: ; preds = %bb49
278 RRETURN_28: ; preds = %bb49
282 RRETURN_29: ; preds = %bb49
286 RRETURN_30: ; preds = %bb49
290 RRETURN_31: ; preds = %bb49
294 RRETURN_38: ; preds = %bb49
298 RRETURN_40: ; preds = %bb49
302 RRETURN_42: ; preds = %bb49
306 RRETURN_44: ; preds = %bb49
310 RRETURN_48: ; preds = %bb49
314 RRETURN_52: ; preds = %bb49
318 RRETURN_1: ; preds = %bb49