Home | History | Annotate | Download | only in XCore
      1 ; RUN: llc -march=xcore < %s | FileCheck %s
      2 
      3 define i32 @switch(i32 %i) {
      4 entry:
      5         switch i32 %i, label %default [
      6                  i32 0, label %bb0
      7                  i32 1, label %bb1
      8                  i32 2, label %bb2
      9                  i32 3, label %bb3
     10                  i32 4, label %bb4
     11                  i32 5, label %bb5
     12                  i32 6, label %bb6
     13                  i32 7, label %bb7
     14                  i32 8, label %bb8
     15                  i32 9, label %bb9
     16                  i32 10, label %bb10
     17                  i32 11, label %bb11
     18                  i32 12, label %bb12
     19                  i32 13, label %bb13
     20                  i32 14, label %bb14
     21                  i32 15, label %bb15
     22                  i32 16, label %bb16
     23                  i32 17, label %bb17
     24                  i32 18, label %bb18
     25                  i32 19, label %bb19
     26                  i32 20, label %bb20
     27                  i32 21, label %bb21
     28                  i32 22, label %bb22
     29                  i32 23, label %bb23
     30                  i32 24, label %bb24
     31                  i32 25, label %bb25
     32                  i32 26, label %bb26
     33                  i32 27, label %bb27
     34                  i32 28, label %bb28
     35                  i32 29, label %bb29
     36                  i32 30, label %bb30
     37                  i32 31, label %bb31
     38                  i32 32, label %bb32
     39                  i32 33, label %bb33
     40                  i32 34, label %bb34
     41                  i32 35, label %bb35
     42                  i32 36, label %bb36
     43                  i32 37, label %bb37
     44                  i32 38, label %bb38
     45                  i32 39, label %bb39
     46         ]
     47 ; CHECK: shl
     48 ; CHECK: bru
     49 ; CHECK: .jmptable
     50 bb0:
     51         ret i32 0
     52 bb1:
     53         ret i32 1
     54 bb2:
     55         ret i32 2
     56 bb3:
     57         ret i32 3
     58 bb4:
     59         ret i32 4
     60 bb5:
     61         ret i32 5
     62 bb6:
     63         ret i32 6
     64 bb7:
     65         ret i32 7
     66 bb8:
     67         ret i32 8
     68 bb9:
     69         ret i32 9
     70 bb10:
     71         ret i32 0
     72 bb11:
     73         ret i32 1
     74 bb12:
     75         ret i32 2
     76 bb13:
     77         ret i32 3
     78 bb14:
     79         ret i32 4
     80 bb15:
     81         ret i32 5
     82 bb16:
     83         ret i32 6
     84 bb17:
     85         ret i32 7
     86 bb18:
     87         ret i32 8
     88 bb19:
     89         ret i32 9
     90 bb20:
     91         ret i32 0
     92 bb21:
     93         ret i32 1
     94 bb22:
     95         ret i32 2
     96 bb23:
     97         ret i32 3
     98 bb24:
     99         ret i32 4
    100 bb25:
    101         ret i32 5
    102 bb26:
    103         ret i32 6
    104 bb27:
    105         ret i32 7
    106 bb28:
    107         ret i32 8
    108 bb29:
    109         ret i32 9
    110 bb30:
    111         ret i32 0
    112 bb31:
    113         ret i32 1
    114 bb32:
    115         ret i32 2
    116 bb33:
    117         ret i32 3
    118 bb34:
    119         ret i32 4
    120 bb35:
    121         ret i32 5
    122 bb36:
    123         ret i32 6
    124 bb37:
    125         ret i32 7
    126 bb38:
    127         ret i32 8
    128 bb39:
    129         ret i32 9
    130 default:
    131         ret i32 0
    132 }
    133