Home | History | Annotate | Download | only in R600
      1 ; RUN: llc < %s -march=r600 -mcpu=SI | FileCheck --check-prefix=SI %s
      2 
      3 ; Make sure the i1 values created by the cfg structurizer pass are
      4 ; moved using VALU instructions
      5 ; SI-NOT: S_MOV_B64 s[{{[0-9]:[0-9]}}], -1
      6 ; SI: V_MOV_B32_e32 v{{[0-9]}}, -1
      7 define void @test_if(i32 %a, i32 %b, i32 addrspace(1)* %src, i32 addrspace(1)* %dst) {
      8 entry:
      9   switch i32 %a, label %default [
     10     i32 0, label %case0
     11     i32 1, label %case1
     12   ]
     13 
     14 case0:
     15   %arrayidx1 = getelementptr i32 addrspace(1)* %dst, i32 %b
     16   store i32 0, i32 addrspace(1)* %arrayidx1, align 4
     17   br label %end
     18 
     19 case1:
     20   %arrayidx5 = getelementptr i32 addrspace(1)* %dst, i32 %b
     21   store i32 1, i32 addrspace(1)* %arrayidx5, align 4
     22   br label %end
     23 
     24 default:
     25   %cmp8 = icmp eq i32 %a, 2
     26   %arrayidx10 = getelementptr i32 addrspace(1)* %dst, i32 %b
     27   br i1 %cmp8, label %if, label %else
     28 
     29 if:
     30   store i32 2, i32 addrspace(1)* %arrayidx10, align 4
     31   br label %end
     32 
     33 else:
     34   store i32 3, i32 addrspace(1)* %arrayidx10, align 4
     35   br label %end
     36 
     37 end:
     38   ret void
     39 }
     40