diff options
author | Matt Arsenault <Matthew.Arsenault@amd.com> | 2017-01-30 16:57:41 +0000 |
---|---|---|
committer | Matt Arsenault <Matthew.Arsenault@amd.com> | 2017-01-30 16:57:41 +0000 |
commit | 0c687390fec36ad86ed2268ce5167a932c043fe0 (patch) | |
tree | e949904c41c63e5420423e4f29029df82254d4f3 /llvm/test/CodeGen/AMDGPU/v_mac.ll | |
parent | 8e644c08ee6e921430e1a1f3e9a8b9dab6c0f8f9 (diff) | |
download | bcm5719-llvm-0c687390fec36ad86ed2268ce5167a932c043fe0.tar.gz bcm5719-llvm-0c687390fec36ad86ed2268ce5167a932c043fe0.zip |
DAG: Constant fold fp16_to_fp/fp16_to_fp
This fixes emitting conversions of constants on targets
without legal f16 that need to use these for legalization.
llvm-svn: 293499
Diffstat (limited to 'llvm/test/CodeGen/AMDGPU/v_mac.ll')
-rw-r--r-- | llvm/test/CodeGen/AMDGPU/v_mac.ll | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/llvm/test/CodeGen/AMDGPU/v_mac.ll b/llvm/test/CodeGen/AMDGPU/v_mac.ll index 8ceb5df6a29..911207815e9 100644 --- a/llvm/test/CodeGen/AMDGPU/v_mac.ll +++ b/llvm/test/CodeGen/AMDGPU/v_mac.ll @@ -248,8 +248,12 @@ bb: ; GCN: {{buffer|flat}}_load_ushort [[A:v[0-9]+]] ; GCN: {{buffer|flat}}_load_ushort [[B:v[0-9]+]] -; FIXME: How is this not folded? -; SI: v_cvt_f32_f16_e32 v{{[0-9]+}}, 0x3c00 +; SI-DAG: v_cvt_f32_f16_e32 [[CVT_A:v[0-9]+]], [[A]] +; SI-DAG: v_cvt_f32_f16_e32 [[CVT_B:v[0-9]+]], [[B]] + +; SI: v_add_f32_e32 [[TMP2:v[0-9]+]], [[CVT_A]], [[CVT_A]] +; SI: v_mad_f32 v{{[0-9]+}}, [[TMP2]], -4.0, 1.0 +; SI: v_mac_f32_e32 v{{[0-9]+}}, 0x41000000, v{{[0-9]+}} ; VI-FLUSH: v_add_f16_e32 [[TMP2:v[0-9]+]], [[A]], [[A]] ; VI-FLUSH: v_mad_f16 v{{[0-9]+}}, [[TMP2]], -4.0, 1.0 |