2016-05-05 22:07:37 +02:00
|
|
|
; RUN: llc -march=amdgcn < %s | FileCheck -check-prefix=SI --check-prefix=FUNC %s
|
2017-01-24 23:02:15 +01:00
|
|
|
; RUN: llc -march=amdgcn -mcpu=tonga -mattr=-flat-for-global < %s | FileCheck -check-prefix=SI --check-prefix=FUNC %s
|
2016-05-05 22:07:37 +02:00
|
|
|
; RUN: llc -march=r600 -mcpu=redwood < %s | FileCheck -check-prefix=EG --check-prefix=FUNC %s
|
2014-02-24 22:01:28 +01:00
|
|
|
|
2014-06-20 19:06:09 +02:00
|
|
|
declare float @llvm.trunc.f32(float) nounwind readnone
|
|
|
|
declare <2 x float> @llvm.trunc.v2f32(<2 x float>) nounwind readnone
|
|
|
|
declare <3 x float> @llvm.trunc.v3f32(<3 x float>) nounwind readnone
|
|
|
|
declare <4 x float> @llvm.trunc.v4f32(<4 x float>) nounwind readnone
|
|
|
|
declare <8 x float> @llvm.trunc.v8f32(<8 x float>) nounwind readnone
|
|
|
|
declare <16 x float> @llvm.trunc.v16f32(<16 x float>) nounwind readnone
|
2014-02-24 22:01:28 +01:00
|
|
|
|
2014-10-01 19:15:17 +02:00
|
|
|
; FUNC-LABEL: {{^}}ftrunc_f32:
|
2014-06-20 19:06:09 +02:00
|
|
|
; EG: TRUNC
|
2014-11-05 15:50:53 +01:00
|
|
|
; SI: v_trunc_f32_e32
|
2017-03-21 22:39:51 +01:00
|
|
|
define amdgpu_kernel void @ftrunc_f32(float addrspace(1)* %out, float %x) {
|
2014-06-20 19:06:09 +02:00
|
|
|
%y = call float @llvm.trunc.f32(float %x) nounwind readnone
|
|
|
|
store float %y, float addrspace(1)* %out
|
2014-06-18 19:05:30 +02:00
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2014-10-01 19:15:17 +02:00
|
|
|
; FUNC-LABEL: {{^}}ftrunc_v2f32:
|
2014-06-20 19:06:09 +02:00
|
|
|
; EG: TRUNC
|
|
|
|
; EG: TRUNC
|
2014-11-05 15:50:53 +01:00
|
|
|
; SI: v_trunc_f32_e32
|
|
|
|
; SI: v_trunc_f32_e32
|
2017-03-21 22:39:51 +01:00
|
|
|
define amdgpu_kernel void @ftrunc_v2f32(<2 x float> addrspace(1)* %out, <2 x float> %x) {
|
2014-06-20 19:06:09 +02:00
|
|
|
%y = call <2 x float> @llvm.trunc.v2f32(<2 x float> %x) nounwind readnone
|
|
|
|
store <2 x float> %y, <2 x float> addrspace(1)* %out
|
2014-02-24 22:01:28 +01:00
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2014-10-01 19:15:17 +02:00
|
|
|
; FIXME-FUNC-LABEL: {{^}}ftrunc_v3f32:
|
2014-06-20 19:06:09 +02:00
|
|
|
; FIXME-EG: TRUNC
|
|
|
|
; FIXME-EG: TRUNC
|
|
|
|
; FIXME-EG: TRUNC
|
2014-11-05 15:50:53 +01:00
|
|
|
; FIXME-SI: v_trunc_f32_e32
|
|
|
|
; FIXME-SI: v_trunc_f32_e32
|
|
|
|
; FIXME-SI: v_trunc_f32_e32
|
2017-03-21 22:39:51 +01:00
|
|
|
; define amdgpu_kernel void @ftrunc_v3f32(<3 x float> addrspace(1)* %out, <3 x float> %x) {
|
2014-06-20 19:06:09 +02:00
|
|
|
; %y = call <3 x float> @llvm.trunc.v3f32(<3 x float> %x) nounwind readnone
|
|
|
|
; store <3 x float> %y, <3 x float> addrspace(1)* %out
|
2014-02-24 22:01:28 +01:00
|
|
|
; ret void
|
|
|
|
; }
|
|
|
|
|
2014-10-01 19:15:17 +02:00
|
|
|
; FUNC-LABEL: {{^}}ftrunc_v4f32:
|
2014-06-20 19:06:09 +02:00
|
|
|
; EG: TRUNC
|
|
|
|
; EG: TRUNC
|
|
|
|
; EG: TRUNC
|
|
|
|
; EG: TRUNC
|
2014-11-05 15:50:53 +01:00
|
|
|
; SI: v_trunc_f32_e32
|
|
|
|
; SI: v_trunc_f32_e32
|
|
|
|
; SI: v_trunc_f32_e32
|
|
|
|
; SI: v_trunc_f32_e32
|
2017-03-21 22:39:51 +01:00
|
|
|
define amdgpu_kernel void @ftrunc_v4f32(<4 x float> addrspace(1)* %out, <4 x float> %x) {
|
2014-06-20 19:06:09 +02:00
|
|
|
%y = call <4 x float> @llvm.trunc.v4f32(<4 x float> %x) nounwind readnone
|
|
|
|
store <4 x float> %y, <4 x float> addrspace(1)* %out
|
2014-02-24 22:01:28 +01:00
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2014-10-01 19:15:17 +02:00
|
|
|
; FUNC-LABEL: {{^}}ftrunc_v8f32:
|
2014-06-20 19:06:09 +02:00
|
|
|
; EG: TRUNC
|
|
|
|
; EG: TRUNC
|
|
|
|
; EG: TRUNC
|
|
|
|
; EG: TRUNC
|
|
|
|
; EG: TRUNC
|
|
|
|
; EG: TRUNC
|
|
|
|
; EG: TRUNC
|
|
|
|
; EG: TRUNC
|
2014-11-05 15:50:53 +01:00
|
|
|
; SI: v_trunc_f32_e32
|
|
|
|
; SI: v_trunc_f32_e32
|
|
|
|
; SI: v_trunc_f32_e32
|
|
|
|
; SI: v_trunc_f32_e32
|
|
|
|
; SI: v_trunc_f32_e32
|
|
|
|
; SI: v_trunc_f32_e32
|
|
|
|
; SI: v_trunc_f32_e32
|
|
|
|
; SI: v_trunc_f32_e32
|
2017-03-21 22:39:51 +01:00
|
|
|
define amdgpu_kernel void @ftrunc_v8f32(<8 x float> addrspace(1)* %out, <8 x float> %x) {
|
2014-06-20 19:06:09 +02:00
|
|
|
%y = call <8 x float> @llvm.trunc.v8f32(<8 x float> %x) nounwind readnone
|
|
|
|
store <8 x float> %y, <8 x float> addrspace(1)* %out
|
2014-02-24 22:01:28 +01:00
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2014-10-01 19:15:17 +02:00
|
|
|
; FUNC-LABEL: {{^}}ftrunc_v16f32:
|
2014-06-20 19:06:09 +02:00
|
|
|
; EG: TRUNC
|
|
|
|
; EG: TRUNC
|
|
|
|
; EG: TRUNC
|
|
|
|
; EG: TRUNC
|
|
|
|
; EG: TRUNC
|
|
|
|
; EG: TRUNC
|
|
|
|
; EG: TRUNC
|
|
|
|
; EG: TRUNC
|
|
|
|
; EG: TRUNC
|
|
|
|
; EG: TRUNC
|
|
|
|
; EG: TRUNC
|
|
|
|
; EG: TRUNC
|
|
|
|
; EG: TRUNC
|
|
|
|
; EG: TRUNC
|
|
|
|
; EG: TRUNC
|
|
|
|
; EG: TRUNC
|
2014-11-05 15:50:53 +01:00
|
|
|
; SI: v_trunc_f32_e32
|
|
|
|
; SI: v_trunc_f32_e32
|
|
|
|
; SI: v_trunc_f32_e32
|
|
|
|
; SI: v_trunc_f32_e32
|
|
|
|
; SI: v_trunc_f32_e32
|
|
|
|
; SI: v_trunc_f32_e32
|
|
|
|
; SI: v_trunc_f32_e32
|
|
|
|
; SI: v_trunc_f32_e32
|
|
|
|
; SI: v_trunc_f32_e32
|
|
|
|
; SI: v_trunc_f32_e32
|
|
|
|
; SI: v_trunc_f32_e32
|
|
|
|
; SI: v_trunc_f32_e32
|
|
|
|
; SI: v_trunc_f32_e32
|
|
|
|
; SI: v_trunc_f32_e32
|
|
|
|
; SI: v_trunc_f32_e32
|
|
|
|
; SI: v_trunc_f32_e32
|
2017-03-21 22:39:51 +01:00
|
|
|
define amdgpu_kernel void @ftrunc_v16f32(<16 x float> addrspace(1)* %out, <16 x float> %x) {
|
2014-06-20 19:06:09 +02:00
|
|
|
%y = call <16 x float> @llvm.trunc.v16f32(<16 x float> %x) nounwind readnone
|
|
|
|
store <16 x float> %y, <16 x float> addrspace(1)* %out
|
2014-02-24 22:01:28 +01:00
|
|
|
ret void
|
|
|
|
}
|