2015-01-06 18:00:21 +00:00
|
|
|
; RUN: llc < %s -march=amdgcn -mcpu=tahiti -verify-machineinstrs | FileCheck %s
|
2015-01-27 17:27:15 +00:00
|
|
|
; RUN: llc < %s -march=amdgcn -mcpu=tonga -verify-machineinstrs | FileCheck %s
|
2013-07-12 18:15:19 +00:00
|
|
|
|
2014-11-13 23:03:09 +00:00
|
|
|
; CHECK-LABEL: {{^}}flt_f64:
|
2014-12-11 22:15:39 +00:00
|
|
|
; CHECK: v_cmp_nge_f64_e32 vcc, {{v[[0-9]+:[0-9]+], v[[0-9]+:[0-9]+]}}
|
2014-11-13 23:03:09 +00:00
|
|
|
define void @flt_f64(i32 addrspace(1)* %out, double addrspace(1)* %in1,
|
2013-07-12 18:15:19 +00:00
|
|
|
double addrspace(1)* %in2) {
|
|
|
|
%r0 = load double addrspace(1)* %in1
|
|
|
|
%r1 = load double addrspace(1)* %in2
|
|
|
|
%r2 = fcmp ult double %r0, %r1
|
2014-11-13 23:03:09 +00:00
|
|
|
%r3 = zext i1 %r2 to i32
|
|
|
|
store i32 %r3, i32 addrspace(1)* %out
|
2013-07-12 18:15:19 +00:00
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2014-11-13 23:03:09 +00:00
|
|
|
; CHECK-LABEL: {{^}}fle_f64:
|
2014-12-11 22:15:39 +00:00
|
|
|
; CHECK: v_cmp_ngt_f64_e32 vcc, {{v[[0-9]+:[0-9]+], v[[0-9]+:[0-9]+]}}
|
2014-11-13 23:03:09 +00:00
|
|
|
define void @fle_f64(i32 addrspace(1)* %out, double addrspace(1)* %in1,
|
2013-07-12 18:15:19 +00:00
|
|
|
double addrspace(1)* %in2) {
|
|
|
|
%r0 = load double addrspace(1)* %in1
|
|
|
|
%r1 = load double addrspace(1)* %in2
|
|
|
|
%r2 = fcmp ule double %r0, %r1
|
2014-11-13 23:03:09 +00:00
|
|
|
%r3 = zext i1 %r2 to i32
|
|
|
|
store i32 %r3, i32 addrspace(1)* %out
|
2013-07-12 18:15:19 +00:00
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2014-11-13 23:03:09 +00:00
|
|
|
; CHECK-LABEL: {{^}}fgt_f64:
|
2014-12-11 22:15:39 +00:00
|
|
|
; CHECK: v_cmp_nle_f64_e32 vcc, {{v[[0-9]+:[0-9]+], v[[0-9]+:[0-9]+]}}
|
2014-11-13 23:03:09 +00:00
|
|
|
define void @fgt_f64(i32 addrspace(1)* %out, double addrspace(1)* %in1,
|
2013-07-12 18:15:19 +00:00
|
|
|
double addrspace(1)* %in2) {
|
|
|
|
%r0 = load double addrspace(1)* %in1
|
|
|
|
%r1 = load double addrspace(1)* %in2
|
|
|
|
%r2 = fcmp ugt double %r0, %r1
|
2014-11-13 23:03:09 +00:00
|
|
|
%r3 = zext i1 %r2 to i32
|
|
|
|
store i32 %r3, i32 addrspace(1)* %out
|
2013-07-12 18:15:19 +00:00
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2014-11-13 23:03:09 +00:00
|
|
|
; CHECK-LABEL: {{^}}fge_f64:
|
2014-12-11 22:15:39 +00:00
|
|
|
; CHECK: v_cmp_nlt_f64_e32 vcc, {{v[[0-9]+:[0-9]+], v[[0-9]+:[0-9]+]}}
|
2014-11-13 23:03:09 +00:00
|
|
|
define void @fge_f64(i32 addrspace(1)* %out, double addrspace(1)* %in1,
|
2013-07-12 18:15:19 +00:00
|
|
|
double addrspace(1)* %in2) {
|
|
|
|
%r0 = load double addrspace(1)* %in1
|
|
|
|
%r1 = load double addrspace(1)* %in2
|
|
|
|
%r2 = fcmp uge double %r0, %r1
|
2014-11-13 23:03:09 +00:00
|
|
|
%r3 = zext i1 %r2 to i32
|
|
|
|
store i32 %r3, i32 addrspace(1)* %out
|
2013-07-12 18:15:19 +00:00
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2014-11-13 23:03:09 +00:00
|
|
|
; CHECK-LABEL: {{^}}fne_f64:
|
2014-11-05 14:50:53 +00:00
|
|
|
; CHECK: v_cmp_neq_f64_e32 vcc, {{v[[0-9]+:[0-9]+], v[[0-9]+:[0-9]+]}}
|
2013-07-12 18:15:19 +00:00
|
|
|
define void @fne_f64(double addrspace(1)* %out, double addrspace(1)* %in1,
|
|
|
|
double addrspace(1)* %in2) {
|
|
|
|
%r0 = load double addrspace(1)* %in1
|
|
|
|
%r1 = load double addrspace(1)* %in2
|
|
|
|
%r2 = fcmp une double %r0, %r1
|
|
|
|
%r3 = select i1 %r2, double %r0, double %r1
|
|
|
|
store double %r3, double addrspace(1)* %out
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2014-11-13 23:03:09 +00:00
|
|
|
; CHECK-LABEL: {{^}}feq_f64:
|
2014-12-11 22:15:43 +00:00
|
|
|
; CHECK: v_cmp_nlg_f64_e32 vcc, {{v[[0-9]+:[0-9]+], v[[0-9]+:[0-9]+]}}
|
2013-07-12 18:15:19 +00:00
|
|
|
define void @feq_f64(double addrspace(1)* %out, double addrspace(1)* %in1,
|
|
|
|
double addrspace(1)* %in2) {
|
|
|
|
%r0 = load double addrspace(1)* %in1
|
|
|
|
%r1 = load double addrspace(1)* %in2
|
|
|
|
%r2 = fcmp ueq double %r0, %r1
|
|
|
|
%r3 = select i1 %r2, double %r0, double %r1
|
|
|
|
store double %r3, double addrspace(1)* %out
|
|
|
|
ret void
|
|
|
|
}
|