1 ; RUN: llc < %s -march=r600 -mcpu=redwood | FileCheck %s
5 ; CHECK: SET{{[NEQGTL]+}}_DX10
7 define void @test_a(i32 addrspace(1)* %out, float %in) {
9 %0 = fcmp ult float %in, 0.000000e+00
10 %1 = select i1 %0, float 1.000000e+00, float 0.000000e+00
11 %2 = fsub float -0.000000e+00, %1
12 %3 = fptosi float %2 to i32
13 %4 = bitcast i32 %3 to float
14 %5 = bitcast float %4 to i32
15 %6 = icmp ne i32 %5, 0
16 br i1 %6, label %IF, label %ENDIF
19 %7 = getelementptr i32 addrspace(1)* %out, i32 1
20 store i32 0, i32 addrspace(1)* %7
24 store i32 0, i32 addrspace(1)* %out
28 ; Same as test_a, but the branch labels are swapped to produce the inverse cc
29 ; for the icmp instruction
33 ; CHECK: SET{{[GTEQN]+}}_DX10
35 ; CHECK-NEXT: ALU clause starting
36 define void @test_b(i32 addrspace(1)* %out, float %in) {
38 %0 = fcmp ult float %in, 0.0
39 %1 = select i1 %0, float 1.000000e+00, float 0.000000e+00
40 %2 = fsub float -0.000000e+00, %1
41 %3 = fptosi float %2 to i32
42 %4 = bitcast i32 %3 to float
43 %5 = bitcast float %4 to i32
44 %6 = icmp ne i32 %5, 0
45 br i1 %6, label %ENDIF, label %IF
48 %7 = getelementptr i32 addrspace(1)* %out, i32 1
49 store i32 0, i32 addrspace(1)* %7
53 store i32 0, i32 addrspace(1)* %out
57 ; Test a CND*_INT instruction with float true/false values
59 ; CHECK: CND{{[GTE]+}}_INT
60 define void @test_c(float addrspace(1)* %out, i32 %in) {
62 %0 = icmp sgt i32 %in, 0
63 %1 = select i1 %0, float 2.0, float 3.0
64 store float %1, float addrspace(1)* %out