Home | History | Annotate | Download | only in Hexagon
      1 ; RUN: llc -march=hexagon < %s | FileCheck %s
      2 
      3 ; CHECK: r{{[0-9]+}} = CONST32(#.LJTI{{[0-9]+_[0-9]+}})
      4 ; CHECK: r{{[0-9]+}} = memw(r{{[0-9]+}} + r{{[0-9]+<<#[0-9]+}})
      5 ; CHECK: jumpr r{{[0-9]+}}
      6 
      7 define void @main() #0 {
      8 entry:
      9   %ret = alloca i32, align 4
     10   br label %while.body
     11 
     12 while.body:
     13   %ret.0.load17 = load volatile i32, i32* %ret, align 4
     14   switch i32 %ret.0.load17, label %label6 [
     15     i32 0, label %label0
     16     i32 1, label %label1
     17     i32 2, label %label2
     18     i32 3, label %label3
     19     i32 4, label %label4
     20     i32 5, label %label5
     21   ]
     22 
     23 label0:
     24   %ret.0.load18 = load volatile i32, i32* %ret, align 4
     25   %inc = add nsw i32 %ret.0.load18, 1
     26   store volatile i32 %inc, i32* %ret, align 4
     27   br label %while.body
     28 
     29 label1:
     30   %ret.0.load19 = load volatile i32, i32* %ret, align 4
     31   %inc2 = add nsw i32 %ret.0.load19, 1
     32   store volatile i32 %inc2, i32* %ret, align 4
     33   br label %while.body
     34 
     35 label2:
     36   %ret.0.load20 = load volatile i32, i32* %ret, align 4
     37   %inc4 = add nsw i32 %ret.0.load20, 1
     38   store volatile i32 %inc4, i32* %ret, align 4
     39   br label %while.body
     40 
     41 label3:
     42   %ret.0.load21 = load volatile i32, i32* %ret, align 4
     43   %inc6 = add nsw i32 %ret.0.load21, 1
     44   store volatile i32 %inc6, i32* %ret, align 4
     45   br label %while.body
     46 
     47 label4:
     48   %ret.0.load22 = load volatile i32, i32* %ret, align 4
     49   %inc8 = add nsw i32 %ret.0.load22, 1
     50   store volatile i32 %inc8, i32* %ret, align 4
     51   br label %while.body
     52 
     53 label5:
     54   %ret.0.load23 = load volatile i32, i32* %ret, align 4
     55   %inc10 = add nsw i32 %ret.0.load23, 1
     56   store volatile i32 %inc10, i32* %ret, align 4
     57   br label %while.body
     58 
     59 label6:
     60   store volatile i32 0, i32* %ret, align 4
     61   br label %while.body
     62 }
     63 
     64 attributes #0 = { noreturn nounwind "target-cpu"="hexagonv4" }
     65