Home | History | Annotate | Download | only in R600
      1 ; RUN: llc < %s -march=r600 -mcpu=redwood | FileCheck %s
      2 
      3 ; These tests are for condition codes that are not supported by the hardware
      4 
      5 ; CHECK: @slt
      6 ; CHECK: SETGT_INT * T{{[0-9]+\.[XYZW]}}, literal.x, KC0[2].Z
      7 ; CHECK-NEXT: 5(7.006492e-45)
      8 define void @slt(i32 addrspace(1)* %out, i32 %in) {
      9 entry:
     10   %0 = icmp slt i32 %in, 5
     11   %1 = select i1 %0, i32 -1, i32 0
     12   store i32 %1, i32 addrspace(1)* %out
     13   ret void
     14 }
     15 
     16 ; CHECK: @ult_i32
     17 ; CHECK: SETGT_UINT * T{{[0-9]+\.[XYZW]}}, literal.x, KC0[2].Z
     18 ; CHECK-NEXT: 5(7.006492e-45)
     19 define void @ult_i32(i32 addrspace(1)* %out, i32 %in) {
     20 entry:
     21   %0 = icmp ult i32 %in, 5
     22   %1 = select i1 %0, i32 -1, i32 0
     23   store i32 %1, i32 addrspace(1)* %out
     24   ret void
     25 }
     26 
     27 ; CHECK: @ult_float
     28 ; CHECK: SETGT * T{{[0-9]+\.[XYZW]}}, literal.x, KC0[2].Z
     29 ; CHECK-NEXT: 1084227584(5.000000e+00)
     30 define void @ult_float(float addrspace(1)* %out, float %in) {
     31 entry:
     32   %0 = fcmp ult float %in, 5.0
     33   %1 = select i1 %0, float 1.0, float 0.0
     34   store float %1, float addrspace(1)* %out
     35   ret void
     36 }
     37 
     38 ; CHECK: @olt
     39 ; CHECK: SETGT * T{{[0-9]+\.[XYZW]}}, literal.x, KC0[2].Z
     40 ;CHECK-NEXT: 1084227584(5.000000e+00)
     41 define void @olt(float addrspace(1)* %out, float %in) {
     42 entry:
     43   %0 = fcmp olt float %in, 5.0
     44   %1 = select i1 %0, float 1.0, float 0.0
     45   store float %1, float addrspace(1)* %out
     46   ret void
     47 }
     48 
     49 ; CHECK: @sle
     50 ; CHECK: SETGT_INT * T{{[0-9]+\.[XYZW]}}, literal.x, KC0[2].Z
     51 ; CHECK-NEXT: 6(8.407791e-45)
     52 define void @sle(i32 addrspace(1)* %out, i32 %in) {
     53 entry:
     54   %0 = icmp sle i32 %in, 5
     55   %1 = select i1 %0, i32 -1, i32 0
     56   store i32 %1, i32 addrspace(1)* %out
     57   ret void
     58 }
     59 
     60 ; CHECK: @ule_i32
     61 ; CHECK: SETGT_UINT * T{{[0-9]+\.[XYZW]}}, literal.x, KC0[2].Z
     62 ; CHECK-NEXT: 6(8.407791e-45)
     63 define void @ule_i32(i32 addrspace(1)* %out, i32 %in) {
     64 entry:
     65   %0 = icmp ule i32 %in, 5
     66   %1 = select i1 %0, i32 -1, i32 0
     67   store i32 %1, i32 addrspace(1)* %out
     68   ret void
     69 }
     70 
     71 ; CHECK: @ule_float
     72 ; CHECK: SETGE * T{{[0-9]+\.[XYZW]}}, literal.x, KC0[2].Z
     73 ; CHECK-NEXT: 1084227584(5.000000e+00)
     74 define void @ule_float(float addrspace(1)* %out, float %in) {
     75 entry:
     76   %0 = fcmp ule float %in, 5.0
     77   %1 = select i1 %0, float 1.0, float 0.0
     78   store float %1, float addrspace(1)* %out
     79   ret void
     80 }
     81 
     82 ; CHECK: @ole
     83 ; CHECK: SETGE * T{{[0-9]+\.[XYZW]}}, literal.x, KC0[2].Z
     84 ; CHECK-NEXT:1084227584(5.000000e+00)
     85 define void @ole(float addrspace(1)* %out, float %in) {
     86 entry:
     87   %0 = fcmp ole float %in, 5.0
     88   %1 = select i1 %0, float 1.0, float 0.0
     89   store float %1, float addrspace(1)* %out
     90   ret void
     91 }
     92