Home | History | Annotate | Download | only in ARM
      1 ;; RUN: llc -O0 -verify-machineinstrs -fast-isel-abort \
      2 ;; RUN:   -mtriple=armv7-linux-gnueabi -filetype=obj %s -o - | \
      3 ;; RUN:   llvm-readobj -t | FileCheck -check-prefix=ARM %s
      4 
      5 ;; RUN: llc -O0 -verify-machineinstrs -fast-isel-abort \
      6 ;; RUN:   -mtriple=thumbv7-linux-gnueabi -filetype=obj %s -o - | \
      7 ;; RUN:   llvm-readobj -t | FileCheck -check-prefix=TMB %s
      8 
      9 ;; Ensure that if a jump table is generated that it has Mapping Symbols
     10 ;; marking the data-in-code region.
     11 
     12 define void @foo(i32* %ptr) nounwind ssp {
     13   %tmp = load i32* %ptr, align 4
     14   switch i32 %tmp, label %default [
     15     i32 11, label %bb0
     16     i32 10, label %bb1
     17     i32 8, label %bb2
     18     i32 4, label %bb3
     19     i32 2, label %bb4
     20     i32 6, label %bb5
     21     i32 9, label %bb6
     22     i32 15, label %bb7
     23     i32 1, label %bb8
     24     i32 3, label %bb9
     25     i32 5, label %bb10
     26     i32 30, label %bb11
     27     i32 31, label %bb12
     28     i32 13, label %bb13
     29     i32 14, label %bb14
     30     i32 20, label %bb15
     31     i32 19, label %bb16
     32     i32 17, label %bb17
     33     i32 18, label %bb18
     34     i32 21, label %bb19
     35     i32 22, label %bb20
     36     i32 16, label %bb21
     37     i32 24, label %bb22
     38     i32 25, label %bb23
     39     i32 26, label %bb24
     40     i32 27, label %bb25
     41     i32 28, label %bb26
     42     i32 23, label %bb27
     43     i32 12, label %bb28
     44   ]
     45 
     46 default:
     47   br label %exit
     48 bb0:
     49   br label %exit
     50 bb1:
     51   br label %exit
     52 bb2:
     53   br label %exit
     54 bb3:
     55   br label %exit
     56 bb4:
     57   br label %exit
     58 bb5:
     59   br label %exit
     60 bb6:
     61   br label %exit
     62 bb7:
     63   br label %exit
     64 bb8:
     65   br label %exit
     66 bb9:
     67   br label %exit
     68 bb10:
     69   br label %exit
     70 bb11:
     71   br label %exit
     72 bb12:
     73   br label %exit
     74 bb13:
     75   br label %exit
     76 bb14:
     77   br label %exit
     78 bb15:
     79   br label %exit
     80 bb16:
     81   br label %exit
     82 bb17:
     83   br label %exit
     84 bb18:
     85   br label %exit
     86 bb19:
     87   br label %exit
     88 bb20:
     89   br label %exit
     90 bb21:
     91   br label %exit
     92 bb22:
     93   br label %exit
     94 bb23:
     95   br label %exit
     96 bb24:
     97   br label %exit
     98 bb25:
     99   br label %exit
    100 bb26:
    101   br label %exit
    102 bb27:
    103   br label %exit
    104 bb28:
    105   br label %exit
    106 
    107 
    108 exit:
    109 
    110   ret void
    111 }
    112 
    113 ;; ARM:        Symbol {
    114 ;; ARM:          Name: $a
    115 ;; ARM-NEXT:     Value: 0x0
    116 ;; ARM-NEXT:     Size: 0
    117 ;; ARM-NEXT:     Binding: Local
    118 ;; ARM-NEXT:     Type: None
    119 ;; ARM-NEXT:     Other:
    120 ;; ARM-NEXT:     Section: [[MIXED_SECT:[^ ]+]]
    121 
    122 ;; ARM:        Symbol {
    123 ;; ARM:          Name: $a
    124 ;; ARM-NEXT:     Value: 0x{{[0-9A-F]+}}
    125 ;; ARM-NEXT:     Size: 0
    126 ;; ARM-NEXT:     Binding: Local
    127 ;; ARM-NEXT:     Type: None
    128 ;; ARM-NEXT:     Other:
    129 ;; ARM-NEXT:     Section: [[MIXED_SECT]]
    130 
    131 ;; ARM:        Symbol {
    132 ;; ARM:          Name: $d
    133 ;; ARM-NEXT:     Value: 0
    134 ;; ARM-NEXT:     Size: 0
    135 ;; ARM-NEXT:     Binding: Local
    136 ;; ARM-NEXT:     Type: None
    137 
    138 ;; ARM:        Symbol {
    139 ;; ARM:          Name: $d
    140 ;; ARM-NEXT:     Value: 0x{{[0-9A-F]+}}
    141 ;; ARM-NEXT:     Size: 0
    142 ;; ARM-NEXT:     Binding: Local
    143 ;; ARM-NEXT:     Type: None
    144 ;; ARM-NEXT:     Other:
    145 ;; ARM-NEXT:     Section: [[MIXED_SECT]]
    146 
    147 ;; ARM:        Symbol {
    148 ;; ARM:          Name: $d
    149 ;; ARM-NEXT:     Value: 0x0
    150 ;; ARM-NEXT:     Size: 0
    151 ;; ARM-NEXT:     Binding: Local (0x0)
    152 ;; ARM-NEXT:     Type: None (0x0)
    153 ;; ARM-NEXT:     Other: 0
    154 ;; ARM-NEXT:     Section: .ARM.exidx
    155 ;; ARM-NEXT:   }
    156 
    157 ;; ARM-NOT:     ${{[atd]}}
    158 
    159 ;; TMB:        Symbol {
    160 ;; TMB:          Name: $d.2
    161 ;; TMB-NEXT:     Value: 0x{{[0-9A-F]+}}
    162 ;; TMB-NEXT:     Size: 0
    163 ;; TMB-NEXT:     Binding: Local
    164 ;; TMB-NEXT:     Type: None
    165 ;; TMB-NEXT:     Other:
    166 ;; TMB-NEXT:     Section: [[MIXED_SECT:[^ ]+]]
    167 
    168 ;; TMB:        Symbol {
    169 ;; TMB:          Name: $t
    170 ;; TMB-NEXT:     Value: 0x0
    171 ;; TMB-NEXT:     Size: 0
    172 ;; TMB-NEXT:     Binding: Local
    173 ;; TMB-NEXT:     Type: None
    174 ;; TMB-NEXT:     Other:
    175 ;; TMB-NEXT:     Section: [[MIXED_SECT]]
    176 
    177 ;; TMB:        Symbol {
    178 ;; TMB:          Name: $t
    179 ;; TMB-NEXT:     Value: 0x{{[0-9A-F]+}}
    180 ;; TMB-NEXT:     Size: 0
    181 ;; TMB-NEXT:     Binding: Local
    182 ;; TMB-NEXT:     Type: None
    183 ;; TMB-NEXT:     Other:
    184 ;; TMB-NEXT:     Section: [[MIXED_SECT]]
    185 
    186 
    187 ;; TMB-NOT:     ${{[atd]}}
    188 
    189