1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py 2; RUN: llc < %s | FileCheck %s 3target 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" 4target triple = "x86_64-apple-darwin10" 5 6declare void @f1() nounwind readnone 7declare void @f2() nounwind readnone 8declare void @f3() nounwind readnone 9declare void @f4() nounwind readnone 10declare void @f5() nounwind readnone 11declare void @f6() nounwind readnone 12declare void @f7() nounwind readnone 13declare void @f8() nounwind readnone 14declare void @f9() nounwind readnone 15declare void @f10() nounwind readnone 16declare void @f11() nounwind readnone 17declare void @f12() nounwind readnone 18declare void @f13() nounwind readnone 19declare void @f14() nounwind readnone 20declare void @f15() nounwind readnone 21declare void @f16() nounwind readnone 22declare void @f17() nounwind readnone 23declare void @f18() nounwind readnone 24declare void @f19() nounwind readnone 25declare void @f20() nounwind readnone 26declare void @f21() nounwind readnone 27declare void @f22() nounwind readnone 28declare void @f23() nounwind readnone 29declare void @f24() nounwind readnone 30declare void @f25() nounwind readnone 31declare void @f26() nounwind readnone 32 33define internal fastcc i32 @foo(i64 %bar) nounwind ssp { 34; CHECK-LABEL: foo: 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 {{.*}}(%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_2: ## %RETURN 49; CHECK-NEXT: callq _f1 50; CHECK-NEXT: jmp LBB0_28 51; CHECK-NEXT: LBB0_4: ## %RRETURN_7 52; CHECK-NEXT: callq _f3 53; CHECK-NEXT: jmp LBB0_28 54; CHECK-NEXT: LBB0_5: ## %RRETURN_14 55; CHECK-NEXT: callq _f4 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_7: ## %RRETURN_16 61; CHECK-NEXT: callq _f6 62; CHECK-NEXT: jmp LBB0_28 63; CHECK-NEXT: LBB0_8: ## %RRETURN_17 64; CHECK-NEXT: callq _f7 65; CHECK-NEXT: jmp LBB0_28 66; CHECK-NEXT: LBB0_9: ## %RRETURN_18 67; CHECK-NEXT: callq _f8 68; CHECK-NEXT: jmp LBB0_28 69; CHECK-NEXT: LBB0_10: ## %RRETURN_19 70; CHECK-NEXT: callq _f9 71; CHECK-NEXT: jmp LBB0_28 72; CHECK-NEXT: LBB0_11: ## %RRETURN_20 73; CHECK-NEXT: callq _f10 74; CHECK-NEXT: jmp LBB0_28 75; CHECK-NEXT: LBB0_12: ## %RRETURN_21 76; CHECK-NEXT: callq _f11 77; CHECK-NEXT: jmp LBB0_28 78; CHECK-NEXT: LBB0_13: ## %RRETURN_22 79; CHECK-NEXT: callq _f12 80; CHECK-NEXT: jmp LBB0_28 81; CHECK-NEXT: LBB0_14: ## %RRETURN_24 82; CHECK-NEXT: callq _f13 83; CHECK-NEXT: jmp LBB0_28 84; CHECK-NEXT: LBB0_15: ## %RRETURN_26 85; CHECK-NEXT: callq _f14 86; CHECK-NEXT: jmp LBB0_28 87; CHECK-NEXT: LBB0_16: ## %RRETURN_27 88; CHECK-NEXT: callq _f15 89; CHECK-NEXT: jmp LBB0_28 90; CHECK-NEXT: LBB0_17: ## %RRETURN_28 91; CHECK-NEXT: callq _f16 92; CHECK-NEXT: jmp LBB0_28 93; CHECK-NEXT: LBB0_18: ## %RRETURN_29 94; CHECK-NEXT: callq _f17 95; CHECK-NEXT: jmp LBB0_28 96; CHECK-NEXT: LBB0_19: ## %RRETURN_30 97; CHECK-NEXT: callq _f18 98; CHECK-NEXT: jmp LBB0_28 99; CHECK-NEXT: LBB0_20: ## %RRETURN_31 100; CHECK-NEXT: callq _f19 101; CHECK-NEXT: jmp LBB0_28 102; CHECK-NEXT: LBB0_21: ## %RRETURN_38 103; CHECK-NEXT: callq _f20 104; CHECK-NEXT: jmp LBB0_28 105; CHECK-NEXT: LBB0_22: ## %RRETURN_40 106; CHECK-NEXT: callq _f21 107; CHECK-NEXT: jmp LBB0_28 108; CHECK-NEXT: LBB0_23: ## %RRETURN_42 109; CHECK-NEXT: callq _f22 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_25: ## %RRETURN_48 115; CHECK-NEXT: callq _f24 116; CHECK-NEXT: jmp LBB0_28 117; CHECK-NEXT: LBB0_26: ## %RRETURN_52 118; CHECK-NEXT: callq _f25 119; CHECK-NEXT: jmp LBB0_28 120; CHECK-NEXT: LBB0_27: ## %RRETURN_1 121; CHECK-NEXT: callq _f26 122; CHECK-NEXT: LBB0_28: ## %EXIT 123; CHECK-NEXT: xorl %eax, %eax 124; CHECK-NEXT: popq %rcx 125; CHECK-NEXT: retq 126; CHECK-NEXT: .p2align 2, 0x90 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 181entry: 182 br label %bb49 183 184bb49: 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 212 ] 213 214RETURN: 215 call void @f1() 216 br label %EXIT 217 218RRETURN_2: ; preds = %bb49 219 call void @f2() 220 br label %EXIT 221 222RRETURN_6: ; preds = %bb49 223 call void @f2() 224 br label %EXIT 225 226RRETURN_7: ; preds = %bb49 227 call void @f3() 228 br label %EXIT 229 230RRETURN_14: ; preds = %bb49 231 call void @f4() 232 br label %EXIT 233 234RRETURN_15: ; preds = %bb49 235 call void @f5() 236 br label %EXIT 237 238RRETURN_16: ; preds = %bb49 239 call void @f6() 240 br label %EXIT 241 242RRETURN_17: ; preds = %bb49 243 call void @f7() 244 br label %EXIT 245 246RRETURN_18: ; preds = %bb49 247 call void @f8() 248 br label %EXIT 249 250RRETURN_19: ; preds = %bb49 251 call void @f9() 252 br label %EXIT 253 254RRETURN_20: ; preds = %bb49 255 call void @f10() 256 br label %EXIT 257 258RRETURN_21: ; preds = %bb49 259 call void @f11() 260 br label %EXIT 261 262RRETURN_22: ; preds = %bb49 263 call void @f12() 264 br label %EXIT 265 266RRETURN_24: ; preds = %bb49 267 call void @f13() 268 br label %EXIT 269 270RRETURN_26: ; preds = %bb49 271 call void @f14() 272 br label %EXIT 273 274RRETURN_27: ; preds = %bb49 275 call void @f15() 276 br label %EXIT 277 278RRETURN_28: ; preds = %bb49 279 call void @f16() 280 br label %EXIT 281 282RRETURN_29: ; preds = %bb49 283 call void @f17() 284 br label %EXIT 285 286RRETURN_30: ; preds = %bb49 287 call void @f18() 288 br label %EXIT 289 290RRETURN_31: ; preds = %bb49 291 call void @f19() 292 br label %EXIT 293 294RRETURN_38: ; preds = %bb49 295 call void @f20() 296 br label %EXIT 297 298RRETURN_40: ; preds = %bb49 299 call void @f21() 300 br label %EXIT 301 302RRETURN_42: ; preds = %bb49 303 call void @f22() 304 br label %EXIT 305 306RRETURN_44: ; preds = %bb49 307 call void @f23() 308 br label %EXIT 309 310RRETURN_48: ; preds = %bb49 311 call void @f24() 312 br label %EXIT 313 314RRETURN_52: ; preds = %bb49 315 call void @f25() 316 br label %EXIT 317 318RRETURN_1: ; preds = %bb49 319 call void @f26() 320 br label %EXIT 321 322EXIT: 323 ret i32 0 324} 325