Home | History | Annotate | Download | only in R600
      1 ; RUN: llc < %s -march=r600 -mcpu=tahiti -verify-machineinstrs | FileCheck %s
      2 
      3 ; CHECK: @flt_f64
      4 ; CHECK: V_CMP_LT_F64_e64 {{s[[0-9]+:[0-9]+], v[[0-9]+:[0-9]+], v[[0-9]+:[0-9]+]}}
      5 
      6 define void @flt_f64(double addrspace(1)* %out, double addrspace(1)* %in1,
      7                      double addrspace(1)* %in2) {
      8    %r0 = load double addrspace(1)* %in1
      9    %r1 = load double addrspace(1)* %in2
     10    %r2 = fcmp ult double %r0, %r1
     11    %r3 = select i1 %r2, double %r0, double %r1
     12    store double %r3, double addrspace(1)* %out
     13    ret void
     14 }
     15 
     16 ; CHECK: @fle_f64
     17 ; CHECK: V_CMP_LE_F64_e64 {{s[[0-9]+:[0-9]+], v[[0-9]+:[0-9]+], v[[0-9]+:[0-9]+]}}
     18 
     19 define void @fle_f64(double addrspace(1)* %out, double addrspace(1)* %in1,
     20                      double addrspace(1)* %in2) {
     21    %r0 = load double addrspace(1)* %in1
     22    %r1 = load double addrspace(1)* %in2
     23    %r2 = fcmp ule double %r0, %r1
     24    %r3 = select i1 %r2, double %r0, double %r1
     25    store double %r3, double addrspace(1)* %out
     26    ret void
     27 }
     28 
     29 ; CHECK: @fgt_f64
     30 ; CHECK: V_CMP_GT_F64_e64 {{s[[0-9]+:[0-9]+], v[[0-9]+:[0-9]+], v[[0-9]+:[0-9]+]}}
     31 
     32 define void @fgt_f64(double addrspace(1)* %out, double addrspace(1)* %in1,
     33                      double addrspace(1)* %in2) {
     34    %r0 = load double addrspace(1)* %in1
     35    %r1 = load double addrspace(1)* %in2
     36    %r2 = fcmp ugt double %r0, %r1
     37    %r3 = select i1 %r2, double %r0, double %r1
     38    store double %r3, double addrspace(1)* %out
     39    ret void
     40 }
     41 
     42 ; CHECK: @fge_f64
     43 ; CHECK: V_CMP_GE_F64_e64 {{s[[0-9]+:[0-9]+], v[[0-9]+:[0-9]+], v[[0-9]+:[0-9]+]}}
     44 
     45 define void @fge_f64(double addrspace(1)* %out, double addrspace(1)* %in1,
     46                      double addrspace(1)* %in2) {
     47    %r0 = load double addrspace(1)* %in1
     48    %r1 = load double addrspace(1)* %in2
     49    %r2 = fcmp uge double %r0, %r1
     50    %r3 = select i1 %r2, double %r0, double %r1
     51    store double %r3, double addrspace(1)* %out
     52    ret void
     53 }
     54 
     55 ; CHECK: @fne_f64
     56 ; CHECK: V_CMP_NEQ_F64_e64 {{s[[0-9]+:[0-9]+], v[[0-9]+:[0-9]+], v[[0-9]+:[0-9]+]}}
     57 
     58 define void @fne_f64(double addrspace(1)* %out, double addrspace(1)* %in1,
     59                      double addrspace(1)* %in2) {
     60    %r0 = load double addrspace(1)* %in1
     61    %r1 = load double addrspace(1)* %in2
     62    %r2 = fcmp une double %r0, %r1
     63    %r3 = select i1 %r2, double %r0, double %r1
     64    store double %r3, double addrspace(1)* %out
     65    ret void
     66 }
     67 
     68 ; CHECK: @feq_f64
     69 ; CHECK: V_CMP_EQ_F64_e64 {{s[[0-9]+:[0-9]+], v[[0-9]+:[0-9]+], v[[0-9]+:[0-9]+]}}
     70 
     71 define void @feq_f64(double addrspace(1)* %out, double addrspace(1)* %in1,
     72                      double addrspace(1)* %in2) {
     73    %r0 = load double addrspace(1)* %in1
     74    %r1 = load double addrspace(1)* %in2
     75    %r2 = fcmp ueq double %r0, %r1
     76    %r3 = select i1 %r2, double %r0, double %r1
     77    store double %r3, double addrspace(1)* %out
     78    ret void
     79 }
     80