summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/AMDGPU/fp_to_uint.ll
diff options
context:
space:
mode:
authorKonstantin Zhuravlyov <kzhuravl_dev@outlook.com>2016-11-17 04:00:46 +0000
committerKonstantin Zhuravlyov <kzhuravl_dev@outlook.com>2016-11-17 04:00:46 +0000
commit3f0cdc7a11b30d67fa9e66d318c760c4434bd74e (patch)
treef16fc9ab73bd06ebcef6c387eca3870de3220f4a /llvm/test/CodeGen/AMDGPU/fp_to_uint.ll
parent0ee25a6973fa49dec89c2ebfa67f3648865562d8 (diff)
downloadbcm5719-llvm-3f0cdc7a11b30d67fa9e66d318c760c4434bd74e.tar.gz
bcm5719-llvm-3f0cdc7a11b30d67fa9e66d318c760c4434bd74e.zip
[AMDGPU] Promote f16/i16 conversions to f32/i32
llvm-svn: 287201
Diffstat (limited to 'llvm/test/CodeGen/AMDGPU/fp_to_uint.ll')
-rw-r--r--llvm/test/CodeGen/AMDGPU/fp_to_uint.ll10
1 files changed, 6 insertions, 4 deletions
diff --git a/llvm/test/CodeGen/AMDGPU/fp_to_uint.ll b/llvm/test/CodeGen/AMDGPU/fp_to_uint.ll
index d1fc9fadebd..d089c291f46 100644
--- a/llvm/test/CodeGen/AMDGPU/fp_to_uint.ll
+++ b/llvm/test/CodeGen/AMDGPU/fp_to_uint.ll
@@ -240,10 +240,12 @@ define void @fp_to_uint_fabs_f32_to_i1(i1 addrspace(1)* %out, float %in) #0 {
}
; FUNC-LABEL: {{^}}fp_to_uint_f32_to_i16:
-; SI: v_cvt_u32_f32_e32 v[[VAL:[0-9]+]], s{{[0-9]+}}
-; VI: v_cvt_f16_f32_e32 v[[IN_F16:[0-9]+]], s{{[0-9]+}}
-; VI: v_cvt_u16_f16_e32 v[[VAL:[0-9]+]], v[[IN_F16]]
-; GCN: buffer_store_short v[[VAL]]
+; The reason different instructions are used on SI and VI is because for
+; SI fp_to_uint is legalized by the type legalizer and for VI it is
+; legalized by the dag legalizer and they legalize fp_to_uint differently.
+; SI: v_cvt_u32_f32_e32 [[VAL:v[0-9]+]], s{{[0-9]+}}
+; VI: v_cvt_i32_f32_e32 [[VAL:v[0-9]+]], s{{[0-9]+}}
+; GCN: buffer_store_short [[VAL]]
define void @fp_to_uint_f32_to_i16(i16 addrspace(1)* %out, float %in) #0 {
%uint = fptoui float %in to i16
store i16 %uint, i16 addrspace(1)* %out
OpenPOWER on IntegriCloud