• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: llc < %s -march=thumb -mattr=+thumb2 -arm-adjust-jump-tables=0 | FileCheck %s
2
3; Do not use tbb / tbh if any destination is before the jumptable.
4; rdar://7102917
5
6define i16 @main__getopt_internal_2E_exit_2E_ce(i32, i1 %b) nounwind {
7; CHECK: main__getopt_internal_2E_exit_2E_ce
8; CHECK-NOT: tbb
9; CHECK-NOT: tbh
10; 32-bit jump tables use explicit branches, not data regions, so make sure
11; we don't annotate this region.
12; CHECK-NOT: data_region
13entry:
14  br i1 %b, label %codeRepl127.exitStub, label %newFuncRoot
15
16newFuncRoot:
17	br label %_getopt_internal.exit.ce
18
19codeRepl127.exitStub:		; preds = %_getopt_internal.exit.ce
20  ; Add an explicit edge back to before the jump table to ensure this block
21  ; is placed first.
22  br i1 %b, label %newFuncRoot, label %codeRepl127.exitStub.exit
23
24codeRepl127.exitStub.exit:
25	ret i16 0
26
27parse_options.exit.loopexit.exitStub:		; preds = %_getopt_internal.exit.ce
28	ret i16 1
29
30bb1.i.exitStub:		; preds = %_getopt_internal.exit.ce
31	ret i16 2
32
33bb90.i.exitStub:		; preds = %_getopt_internal.exit.ce
34	ret i16 3
35
36codeRepl104.exitStub:		; preds = %_getopt_internal.exit.ce
37	ret i16 4
38
39codeRepl113.exitStub:		; preds = %_getopt_internal.exit.ce
40	ret i16 5
41
42codeRepl51.exitStub:		; preds = %_getopt_internal.exit.ce
43	ret i16 6
44
45codeRepl70.exitStub:		; preds = %_getopt_internal.exit.ce
46	ret i16 7
47
48codeRepl119.exitStub:		; preds = %_getopt_internal.exit.ce
49	ret i16 8
50
51codeRepl93.exitStub:		; preds = %_getopt_internal.exit.ce
52	ret i16 9
53
54codeRepl101.exitStub:		; preds = %_getopt_internal.exit.ce
55	ret i16 10
56
57codeRepl120.exitStub:		; preds = %_getopt_internal.exit.ce
58	ret i16 11
59
60codeRepl89.exitStub:		; preds = %_getopt_internal.exit.ce
61	ret i16 12
62
63codeRepl45.exitStub:		; preds = %_getopt_internal.exit.ce
64	ret i16 13
65
66codeRepl58.exitStub:		; preds = %_getopt_internal.exit.ce
67	ret i16 14
68
69codeRepl46.exitStub:		; preds = %_getopt_internal.exit.ce
70	ret i16 15
71
72codeRepl50.exitStub:		; preds = %_getopt_internal.exit.ce
73	ret i16 16
74
75codeRepl52.exitStub:		; preds = %_getopt_internal.exit.ce
76	ret i16 17
77
78codeRepl53.exitStub:		; preds = %_getopt_internal.exit.ce
79	ret i16 18
80
81codeRepl61.exitStub:		; preds = %_getopt_internal.exit.ce
82	ret i16 19
83
84codeRepl85.exitStub:		; preds = %_getopt_internal.exit.ce
85	ret i16 20
86
87codeRepl97.exitStub:		; preds = %_getopt_internal.exit.ce
88	ret i16 21
89
90codeRepl79.exitStub:		; preds = %_getopt_internal.exit.ce
91	ret i16 22
92
93codeRepl102.exitStub:		; preds = %_getopt_internal.exit.ce
94	ret i16 23
95
96codeRepl54.exitStub:		; preds = %_getopt_internal.exit.ce
97	ret i16 24
98
99codeRepl57.exitStub:		; preds = %_getopt_internal.exit.ce
100	ret i16 25
101
102codeRepl103.exitStub:		; preds = %_getopt_internal.exit.ce
103	ret i16 26
104
105_getopt_internal.exit.ce:		; preds = %newFuncRoot
106	switch i32 %0, label %codeRepl127.exitStub [
107		i32 -1, label %parse_options.exit.loopexit.exitStub
108		i32 0, label %bb1.i.exitStub
109		i32 63, label %bb90.i.exitStub
110		i32 66, label %codeRepl104.exitStub
111		i32 67, label %codeRepl113.exitStub
112		i32 71, label %codeRepl51.exitStub
113		i32 77, label %codeRepl70.exitStub
114		i32 78, label %codeRepl119.exitStub
115		i32 80, label %codeRepl93.exitStub
116		i32 81, label %codeRepl101.exitStub
117		i32 82, label %codeRepl120.exitStub
118		i32 88, label %codeRepl89.exitStub
119		i32 97, label %codeRepl45.exitStub
120		i32 98, label %codeRepl58.exitStub
121		i32 99, label %codeRepl46.exitStub
122		i32 100, label %codeRepl50.exitStub
123		i32 104, label %codeRepl52.exitStub
124		i32 108, label %codeRepl53.exitStub
125		i32 109, label %codeRepl61.exitStub
126		i32 110, label %codeRepl85.exitStub
127		i32 111, label %codeRepl97.exitStub
128		i32 113, label %codeRepl79.exitStub
129		i32 114, label %codeRepl102.exitStub
130		i32 115, label %codeRepl54.exitStub
131		i32 116, label %codeRepl57.exitStub
132		i32 118, label %codeRepl103.exitStub
133	]
134}
135