1 ; RUN: llc < %s -mtriple=thumbv7-apple-darwin | FileCheck %s 2 ; RUN: llc < %s -mtriple=thumbv7-apple-darwin -relocation-model=pic | FileCheck %s 3 ; RUN: llc < %s -mtriple=thumbv6m-apple-darwin -relocation-model=static | FileCheck %s --check-prefix=THUMB1 4 ; RUN: llc < %s -mtriple=thumbv6m-apple-darwin -relocation-model=pic | FileCheck %s --check-prefix=THUMB1 5 6 define void @bar(i32 %n.u) { 7 entry: 8 ; CHECK-LABEL: bar: 9 ; CHECK: tbb 10 ; CHECK: .data_region jt8 11 ; CHECK: .end_data_region 12 ; CHECK-NEXT: .p2align 1 13 14 ; THUMB1-LABEL: bar: 15 ; THUMB1: add pc, r0 16 ; THUMB1: .data_region jt8 17 ; THUMB1: .byte (LBB0_3-(LCPI0_0+4))/2 18 ; THUMB1: .end_data_region 19 ; THUMB1-NEXT: .p2align 1 20 21 switch i32 %n.u, label %bb12 [i32 1, label %bb i32 2, label %bb6 i32 4, label %bb7 i32 5, label %bb8 i32 6, label %bb10 i32 7, label %bb1 i32 8, label %bb3 i32 9, label %bb4 i32 10, label %bb9 i32 11, label %bb2 i32 12, label %bb5 i32 13, label %bb11 ] 22 bb: 23 tail call void(...) @foo1() 24 ret void 25 bb1: 26 tail call void(...) @foo2() 27 ret void 28 bb2: 29 tail call void(...) @foo6() 30 ret void 31 bb3: 32 tail call void(...) @foo3() 33 ret void 34 bb4: 35 tail call void(...) @foo4() 36 ret void 37 bb5: 38 tail call void(...) @foo5() 39 ret void 40 bb6: 41 tail call void(...) @foo1() 42 ret void 43 bb7: 44 tail call void(...) @foo2() 45 ret void 46 bb8: 47 tail call void(...) @foo6() 48 ret void 49 bb9: 50 tail call void(...) @foo3() 51 ret void 52 bb10: 53 tail call void(...) @foo4() 54 ret void 55 bb11: 56 tail call void(...) @foo5() 57 ret void 58 bb12: 59 tail call void(...) @foo6() 60 ret void 61 } 62 63 declare void @foo1(...) 64 declare void @foo2(...) 65 declare void @foo6(...) 66 declare void @foo3(...) 67 declare void @foo4(...) 68 declare void @foo5(...) 69