• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
6define void @bar(i32 %n.u) {
7entry:
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 ]
22bb:
23    tail call void(...) @foo1()
24    ret void
25bb1:
26    tail call void(...) @foo2()
27    ret void
28bb2:
29    tail call void(...) @foo6()
30    ret void
31bb3:
32    tail call void(...) @foo3()
33    ret void
34bb4:
35    tail call void(...) @foo4()
36    ret void
37bb5:
38    tail call void(...) @foo5()
39    ret void
40bb6:
41    tail call void(...) @foo1()
42    ret void
43bb7:
44    tail call void(...) @foo2()
45    ret void
46bb8:
47    tail call void(...) @foo6()
48    ret void
49bb9:
50    tail call void(...) @foo3()
51    ret void
52bb10:
53    tail call void(...) @foo4()
54    ret void
55bb11:
56    tail call void(...) @foo5()
57    ret void
58bb12:
59    tail call void(...) @foo6()
60    ret void
61}
62
63declare void @foo1(...)
64declare void @foo2(...)
65declare void @foo6(...)
66declare void @foo3(...)
67declare void @foo4(...)
68declare void @foo5(...)
69