Home | History | Annotate | Download | only in Thumb2
      1 ; RUN: llc -mtriple=thumb-eabi -mcpu=arm1156t2-s -mattr=+thumb2 -arm-adjust-jump-tables=0 %s -o - | FileCheck %s
      2 
      3 ; Do not use tbb / tbh if any destination is before the jumptable.
      4 ; rdar://7102917
      5 
      6 define 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
     13 entry:
     14   br i1 %b, label %codeRepl127.exitStub, label %newFuncRoot
     15 
     16 newFuncRoot:
     17 	br label %_getopt_internal.exit.ce
     18 
     19 codeRepl127.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 
     24 codeRepl127.exitStub.exit:
     25 	ret i16 0
     26 
     27 parse_options.exit.loopexit.exitStub:		; preds = %_getopt_internal.exit.ce
     28 	ret i16 1
     29 
     30 bb1.i.exitStub:		; preds = %_getopt_internal.exit.ce
     31 	ret i16 2
     32 
     33 bb90.i.exitStub:		; preds = %_getopt_internal.exit.ce
     34 	ret i16 3
     35 
     36 codeRepl104.exitStub:		; preds = %_getopt_internal.exit.ce
     37 	ret i16 4
     38 
     39 codeRepl113.exitStub:		; preds = %_getopt_internal.exit.ce
     40 	ret i16 5
     41 
     42 codeRepl51.exitStub:		; preds = %_getopt_internal.exit.ce
     43 	ret i16 6
     44 
     45 codeRepl70.exitStub:		; preds = %_getopt_internal.exit.ce
     46 	ret i16 7
     47 
     48 codeRepl119.exitStub:		; preds = %_getopt_internal.exit.ce
     49 	ret i16 8
     50 
     51 codeRepl93.exitStub:		; preds = %_getopt_internal.exit.ce
     52 	ret i16 9
     53 
     54 codeRepl101.exitStub:		; preds = %_getopt_internal.exit.ce
     55 	ret i16 10
     56 
     57 codeRepl120.exitStub:		; preds = %_getopt_internal.exit.ce
     58 	ret i16 11
     59 
     60 codeRepl89.exitStub:		; preds = %_getopt_internal.exit.ce
     61 	ret i16 12
     62 
     63 codeRepl45.exitStub:		; preds = %_getopt_internal.exit.ce
     64 	ret i16 13
     65 
     66 codeRepl58.exitStub:		; preds = %_getopt_internal.exit.ce
     67 	ret i16 14
     68 
     69 codeRepl46.exitStub:		; preds = %_getopt_internal.exit.ce
     70 	ret i16 15
     71 
     72 codeRepl50.exitStub:		; preds = %_getopt_internal.exit.ce
     73 	ret i16 16
     74 
     75 codeRepl52.exitStub:		; preds = %_getopt_internal.exit.ce
     76 	ret i16 17
     77 
     78 codeRepl53.exitStub:		; preds = %_getopt_internal.exit.ce
     79 	ret i16 18
     80 
     81 codeRepl61.exitStub:		; preds = %_getopt_internal.exit.ce
     82 	ret i16 19
     83 
     84 codeRepl85.exitStub:		; preds = %_getopt_internal.exit.ce
     85 	ret i16 20
     86 
     87 codeRepl97.exitStub:		; preds = %_getopt_internal.exit.ce
     88 	ret i16 21
     89 
     90 codeRepl79.exitStub:		; preds = %_getopt_internal.exit.ce
     91 	ret i16 22
     92 
     93 codeRepl102.exitStub:		; preds = %_getopt_internal.exit.ce
     94 	ret i16 23
     95 
     96 codeRepl54.exitStub:		; preds = %_getopt_internal.exit.ce
     97 	ret i16 24
     98 
     99 codeRepl57.exitStub:		; preds = %_getopt_internal.exit.ce
    100 	ret i16 25
    101 
    102 codeRepl103.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