Convert more tests to avoid llvm-as.
[oota-llvm.git] / test / CodeGen / X86 / pic-jtbl.ll
1 ; RUN: llc < %s -mtriple=i686-pc-linux-gnu -relocation-model=pic \
2 ; RUN:   -o %t
3 ; RUN: grep _GLOBAL_OFFSET_TABLE_ %t
4 ; RUN: grep piclabel %t | count 3
5 ; RUN: grep PLT %t | count 6
6 ; RUN: grep GOTOFF %t | count 14
7 ; RUN: grep JTI %t | count 2
8
9 ; X86-64:
10 ; RUN: llc < %s -mtriple=x86_64-pc-linux-gnu -relocation-model=pic > %t
11 ; RUN: grep {LJTI1_0(%rip)} %t
12 define void @bar(i32 %n.u) nounwind {
13 entry:
14     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 ]
15 bb:
16     tail call void(...)* @foo1()
17     ret void
18 bb1:
19     tail call void(...)* @foo2()
20     ret void
21 bb2:
22     tail call void(...)* @foo6()
23     ret void
24 bb3:
25     tail call void(...)* @foo3()
26     ret void
27 bb4:
28     tail call void(...)* @foo4()
29     ret void
30 bb5:
31     tail call void(...)* @foo5()
32     ret void
33 bb6:
34     tail call void(...)* @foo1()
35     ret void
36 bb7:
37     tail call void(...)* @foo2()
38     ret void
39 bb8:
40     tail call void(...)* @foo6()
41     ret void
42 bb9:
43     tail call void(...)* @foo3()
44     ret void
45 bb10:
46     tail call void(...)* @foo4()
47     ret void
48 bb11:
49     tail call void(...)* @foo5()
50     ret void
51 bb12:
52     tail call void(...)* @foo6()
53     ret void
54 }
55
56 declare void @foo1(...)
57 declare void @foo2(...)
58 declare void @foo6(...)
59 declare void @foo3(...)
60 declare void @foo4(...)
61 declare void @foo5(...)