2014-04-17 17:06:37 +00:00
|
|
|
; RUN: llc -march=r600 -mcpu=bonaire -verify-machineinstrs < %s | FileCheck -check-prefix=CI -check-prefix=FUNC %s
|
2014-06-18 17:05:26 +00:00
|
|
|
; RUN: llc -march=r600 -mcpu=SI -verify-machineinstrs < %s | FileCheck -check-prefix=SI -check-prefix=FUNC %s
|
2014-04-17 17:06:37 +00:00
|
|
|
|
2014-10-01 17:15:17 +00:00
|
|
|
; FUNC-LABEL: {{^}}rint_f64:
|
2014-11-05 14:50:53 +00:00
|
|
|
; CI: v_rndne_f64_e32
|
2014-06-18 17:05:26 +00:00
|
|
|
|
2014-11-05 14:50:53 +00:00
|
|
|
; SI-DAG: v_add_f64
|
|
|
|
; SI-DAG: v_add_f64
|
|
|
|
; SI-DAG v_cmp_gt_f64_e64
|
|
|
|
; SI: v_cndmask_b32
|
|
|
|
; SI: v_cndmask_b32
|
|
|
|
; SI: s_endpgm
|
2014-06-18 17:05:26 +00:00
|
|
|
define void @rint_f64(double addrspace(1)* %out, double %in) {
|
2014-04-17 17:06:37 +00:00
|
|
|
entry:
|
|
|
|
%0 = call double @llvm.rint.f64(double %in)
|
|
|
|
store double %0, double addrspace(1)* %out
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2014-10-01 17:15:17 +00:00
|
|
|
; FUNC-LABEL: {{^}}rint_v2f64:
|
2014-11-05 14:50:53 +00:00
|
|
|
; CI: v_rndne_f64_e32
|
|
|
|
; CI: v_rndne_f64_e32
|
2014-06-18 17:05:26 +00:00
|
|
|
define void @rint_v2f64(<2 x double> addrspace(1)* %out, <2 x double> %in) {
|
2014-04-17 17:06:37 +00:00
|
|
|
entry:
|
|
|
|
%0 = call <2 x double> @llvm.rint.v2f64(<2 x double> %in)
|
|
|
|
store <2 x double> %0, <2 x double> addrspace(1)* %out
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2014-10-01 17:15:17 +00:00
|
|
|
; FUNC-LABEL: {{^}}rint_v4f64:
|
2014-11-05 14:50:53 +00:00
|
|
|
; CI: v_rndne_f64_e32
|
|
|
|
; CI: v_rndne_f64_e32
|
|
|
|
; CI: v_rndne_f64_e32
|
|
|
|
; CI: v_rndne_f64_e32
|
2014-06-18 17:05:26 +00:00
|
|
|
define void @rint_v4f64(<4 x double> addrspace(1)* %out, <4 x double> %in) {
|
2014-04-17 17:06:37 +00:00
|
|
|
entry:
|
|
|
|
%0 = call <4 x double> @llvm.rint.v4f64(<4 x double> %in)
|
|
|
|
store <4 x double> %0, <4 x double> addrspace(1)* %out
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
declare double @llvm.rint.f64(double) #0
|
|
|
|
declare <2 x double> @llvm.rint.v2f64(<2 x double>) #0
|
|
|
|
declare <4 x double> @llvm.rint.v4f64(<4 x double>) #0
|