2015-02-11 22:26:46 +08:00
|
|
|
; RUN: llc -march=amdgcn -mcpu=tonga -verify-machineinstrs < %s | FileCheck -check-prefix=CI -check-prefix=FUNC %s
|
2015-01-07 02:00:21 +08:00
|
|
|
; RUN: llc -march=amdgcn -mcpu=bonaire -verify-machineinstrs < %s | FileCheck -check-prefix=CI -check-prefix=FUNC %s
|
|
|
|
; RUN: llc -march=amdgcn -mcpu=SI -verify-machineinstrs < %s | FileCheck -check-prefix=SI -check-prefix=FUNC %s
|
2014-04-18 01:06:37 +08:00
|
|
|
|
2014-10-02 01:15:17 +08:00
|
|
|
; FUNC-LABEL: {{^}}rint_f64:
|
2014-11-05 22:50:53 +08:00
|
|
|
; CI: v_rndne_f64_e32
|
2014-06-19 01:05:26 +08:00
|
|
|
|
2014-11-05 22:50:53 +08: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-19 01:05:26 +08:00
|
|
|
define void @rint_f64(double addrspace(1)* %out, double %in) {
|
2014-04-18 01:06:37 +08:00
|
|
|
entry:
|
|
|
|
%0 = call double @llvm.rint.f64(double %in)
|
|
|
|
store double %0, double addrspace(1)* %out
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2014-10-02 01:15:17 +08:00
|
|
|
; FUNC-LABEL: {{^}}rint_v2f64:
|
2014-11-05 22:50:53 +08:00
|
|
|
; CI: v_rndne_f64_e32
|
|
|
|
; CI: v_rndne_f64_e32
|
2014-06-19 01:05:26 +08:00
|
|
|
define void @rint_v2f64(<2 x double> addrspace(1)* %out, <2 x double> %in) {
|
2014-04-18 01:06:37 +08: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-02 01:15:17 +08:00
|
|
|
; FUNC-LABEL: {{^}}rint_v4f64:
|
2014-11-05 22:50:53 +08:00
|
|
|
; CI: v_rndne_f64_e32
|
|
|
|
; CI: v_rndne_f64_e32
|
|
|
|
; CI: v_rndne_f64_e32
|
|
|
|
; CI: v_rndne_f64_e32
|
2014-06-19 01:05:26 +08:00
|
|
|
define void @rint_v4f64(<4 x double> addrspace(1)* %out, <4 x double> %in) {
|
2014-04-18 01:06:37 +08: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
|