1 ; RUN: llc -mtriple=thumb-eabi -mcpu=arm1156t2-s -mattr=+thumb2 -arm-adjust-jump-tables=0 %s -o - | FileCheck %s
2 ; RUN: llc -mtriple=thumbv6-eabi -mcpu=cortex-m0 -arm-adjust-jump-tables=0 %s -o - | FileCheck %s
4 ; Do not use tbb / tbh if any destination is before the jumptable.
7 define i16 @main__getopt_internal_2E_exit_2E_ce(i32, i1 %b) nounwind {
8 ; CHECK: main__getopt_internal_2E_exit_2E_ce
11 ; 32-bit jump tables use explicit branches, not data regions, so make sure
12 ; we don't annotate this region.
13 ; CHECK-NOT: data_region
15 br i1 %b, label %codeRepl127.exitStub, label %newFuncRoot
17 codeRepl127.exitStub: ; preds = %_getopt_internal.exit.ce
18 ; Add an explicit edge back to before the jump table to ensure this block
20 br i1 %b, label %newFuncRoot, label %codeRepl127.exitStub.exit
22 codeRepl127.exitStub.exit:
25 parse_options.exit.loopexit.exitStub: ; preds = %_getopt_internal.exit.ce
28 bb1.i.exitStub: ; preds = %_getopt_internal.exit.ce
31 bb90.i.exitStub: ; preds = %_getopt_internal.exit.ce
34 codeRepl104.exitStub: ; preds = %_getopt_internal.exit.ce
37 codeRepl113.exitStub: ; preds = %_getopt_internal.exit.ce
40 codeRepl51.exitStub: ; preds = %_getopt_internal.exit.ce
43 codeRepl70.exitStub: ; preds = %_getopt_internal.exit.ce
46 codeRepl119.exitStub: ; preds = %_getopt_internal.exit.ce
49 codeRepl93.exitStub: ; preds = %_getopt_internal.exit.ce
52 codeRepl101.exitStub: ; preds = %_getopt_internal.exit.ce
55 codeRepl120.exitStub: ; preds = %_getopt_internal.exit.ce
58 codeRepl89.exitStub: ; preds = %_getopt_internal.exit.ce
61 codeRepl45.exitStub: ; preds = %_getopt_internal.exit.ce
64 codeRepl58.exitStub: ; preds = %_getopt_internal.exit.ce
67 codeRepl46.exitStub: ; preds = %_getopt_internal.exit.ce
70 codeRepl50.exitStub: ; preds = %_getopt_internal.exit.ce
73 codeRepl52.exitStub: ; preds = %_getopt_internal.exit.ce
76 codeRepl53.exitStub: ; preds = %_getopt_internal.exit.ce
79 codeRepl61.exitStub: ; preds = %_getopt_internal.exit.ce
82 codeRepl85.exitStub: ; preds = %_getopt_internal.exit.ce
85 codeRepl97.exitStub: ; preds = %_getopt_internal.exit.ce
88 codeRepl79.exitStub: ; preds = %_getopt_internal.exit.ce
91 codeRepl102.exitStub: ; preds = %_getopt_internal.exit.ce
94 codeRepl54.exitStub: ; preds = %_getopt_internal.exit.ce
97 codeRepl57.exitStub: ; preds = %_getopt_internal.exit.ce
100 codeRepl103.exitStub: ; preds = %_getopt_internal.exit.ce
104 br label %_getopt_internal.exit.ce
106 _getopt_internal.exit.ce: ; preds = %newFuncRoot
107 switch i32 %0, label %codeRepl127.exitStub [
108 i32 -1, label %parse_options.exit.loopexit.exitStub
109 i32 0, label %bb1.i.exitStub
110 i32 63, label %bb90.i.exitStub
111 i32 66, label %codeRepl104.exitStub
112 i32 67, label %codeRepl113.exitStub
113 i32 71, label %codeRepl51.exitStub
114 i32 77, label %codeRepl70.exitStub
115 i32 78, label %codeRepl119.exitStub
116 i32 80, label %codeRepl93.exitStub
117 i32 81, label %codeRepl101.exitStub
118 i32 82, label %codeRepl120.exitStub
119 i32 88, label %codeRepl89.exitStub
120 i32 97, label %codeRepl45.exitStub
121 i32 98, label %codeRepl58.exitStub
122 i32 99, label %codeRepl46.exitStub
123 i32 100, label %codeRepl50.exitStub
124 i32 104, label %codeRepl52.exitStub
125 i32 108, label %codeRepl53.exitStub
126 i32 109, label %codeRepl61.exitStub
127 i32 110, label %codeRepl85.exitStub
128 i32 111, label %codeRepl97.exitStub
129 i32 113, label %codeRepl79.exitStub
130 i32 114, label %codeRepl102.exitStub
131 i32 115, label %codeRepl54.exitStub
132 i32 116, label %codeRepl57.exitStub
133 i32 118, label %codeRepl103.exitStub