blob: cd35bffb1304e31b871d9a375180b12c64b2c25b [file] [log] [blame]
Vincent Lejeunec44fa992013-04-04 13:59:59 +00001;RUN: llc < %s -march=r600 -mcpu=redwood | FileCheck %s
2
3; CHECK: JUMP @4
4
5define void @main() #0 {
6main_body:
7 %0 = load <4 x float> addrspace(8)* getelementptr ([1024 x <4 x float>] addrspace(8)* null, i64 0, i32 1)
8 %1 = extractelement <4 x float> %0, i32 0
9 %2 = bitcast float %1 to i32
10 %3 = icmp eq i32 %2, 0
11 %4 = sext i1 %3 to i32
12 %5 = bitcast i32 %4 to float
13 %6 = bitcast float %5 to i32
14 %7 = icmp ne i32 %6, 0
15 br i1 %7, label %ENDIF, label %ELSE
16
17ELSE: ; preds = %main_body
18 %8 = load <4 x float> addrspace(8)* getelementptr ([1024 x <4 x float>] addrspace(8)* null, i64 0, i32 1)
19 %9 = extractelement <4 x float> %8, i32 0
20 %10 = bitcast float %9 to i32
21 %11 = icmp eq i32 %10, 1
22 %12 = sext i1 %11 to i32
23 %13 = bitcast i32 %12 to float
24 %14 = bitcast float %13 to i32
25 %15 = icmp ne i32 %14, 0
26 br i1 %15, label %IF13, label %ENDIF
27
28ENDIF: ; preds = %IF13, %ELSE, %main_body
29 %temp.0 = phi float [ 0xFFF8000000000000, %main_body ], [ 0.000000e+00, %ELSE ], [ 0.000000e+00, %IF13 ]
30 %temp1.0 = phi float [ 0.000000e+00, %main_body ], [ %23, %IF13 ], [ 0.000000e+00, %ELSE ]
31 %temp2.0 = phi float [ 1.000000e+00, %main_body ], [ 0.000000e+00, %ELSE ], [ 0.000000e+00, %IF13 ]
32 %temp3.0 = phi float [ 5.000000e-01, %main_body ], [ 0.000000e+00, %ELSE ], [ 0.000000e+00, %IF13 ]
33 %16 = insertelement <4 x float> undef, float %temp.0, i32 0
34 %17 = insertelement <4 x float> %16, float %temp1.0, i32 1
35 %18 = insertelement <4 x float> %17, float %temp2.0, i32 2
36 %19 = insertelement <4 x float> %18, float %temp3.0, i32 3
37 call void @llvm.R600.store.swizzle(<4 x float> %19, i32 0, i32 0)
38 ret void
39
40IF13: ; preds = %ELSE
41 %20 = load <4 x float> addrspace(8)* null
42 %21 = extractelement <4 x float> %20, i32 0
43 %22 = fsub float -0.000000e+00, %21
44 %23 = fadd float 0xFFF8000000000000, %22
45 br label %ENDIF
46}
47
48declare void @llvm.R600.store.swizzle(<4 x float>, i32, i32)
49
50attributes #0 = { "ShaderType"="0" }