diff options
| author | Stanislav Mekhanoshin <Stanislav.Mekhanoshin@amd.com> | 2018-06-27 15:33:33 +0000 |
|---|---|---|
| committer | Stanislav Mekhanoshin <Stanislav.Mekhanoshin@amd.com> | 2018-06-27 15:33:33 +0000 |
| commit | 1a1687f1bb23a9710797b2e0a2f5b68833c93e5e (patch) | |
| tree | f809ed6bb538d27ab7cf3590dce82d0c373cfcbf /llvm/test/CodeGen/AMDGPU/udiv.ll | |
| parent | 43eec242e0c031b5548eb3a260b9db4b8b0daf7f (diff) | |
| download | bcm5719-llvm-1a1687f1bb23a9710797b2e0a2f5b68833c93e5e.tar.gz bcm5719-llvm-1a1687f1bb23a9710797b2e0a2f5b68833c93e5e.zip | |
[AMDGPU] Convert rcp to rcp_iflag
If a source of rcp instruction is a result of any conversion from
an integer convert it into rcp_iflag instruction. No FP exception
can ever happen except division by zero if a single precision rcp
argument is a representation of an integral number.
Differential Revision: https://reviews.llvm.org/D48569
llvm-svn: 335742
Diffstat (limited to 'llvm/test/CodeGen/AMDGPU/udiv.ll')
| -rw-r--r-- | llvm/test/CodeGen/AMDGPU/udiv.ll | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/test/CodeGen/AMDGPU/udiv.ll b/llvm/test/CodeGen/AMDGPU/udiv.ll index 1d683776bfd..00a240e173f 100644 --- a/llvm/test/CodeGen/AMDGPU/udiv.ll +++ b/llvm/test/CodeGen/AMDGPU/udiv.ll @@ -100,7 +100,7 @@ define amdgpu_kernel void @udiv_i32_div_k_odd(i32 addrspace(1)* %out, i32 addrsp } ; FUNC-LABEL: {{^}}v_udiv_i8: -; SI: v_rcp_f32 +; SI: v_rcp_iflag_f32 ; SI: v_and_b32_e32 [[TRUNC:v[0-9]+]], 0xff, v{{[0-9]+}} ; SI: buffer_store_dword [[TRUNC]] define amdgpu_kernel void @v_udiv_i8(i32 addrspace(1)* %out, i8 addrspace(1)* %in) { @@ -114,7 +114,7 @@ define amdgpu_kernel void @v_udiv_i8(i32 addrspace(1)* %out, i8 addrspace(1)* %i } ; FUNC-LABEL: {{^}}v_udiv_i16: -; SI: v_rcp_f32 +; SI: v_rcp_iflag_f32 ; SI: v_and_b32_e32 [[TRUNC:v[0-9]+]], 0xffff, v{{[0-9]+}} ; SI: buffer_store_dword [[TRUNC]] define amdgpu_kernel void @v_udiv_i16(i32 addrspace(1)* %out, i16 addrspace(1)* %in) { @@ -128,7 +128,7 @@ define amdgpu_kernel void @v_udiv_i16(i32 addrspace(1)* %out, i16 addrspace(1)* } ; FUNC-LABEL: {{^}}v_udiv_i23: -; SI: v_rcp_f32 +; SI: v_rcp_iflag_f32 ; SI: v_and_b32_e32 [[TRUNC:v[0-9]+]], 0x7fffff, v{{[0-9]+}} ; SI: buffer_store_dword [[TRUNC]] define amdgpu_kernel void @v_udiv_i23(i32 addrspace(1)* %out, i23 addrspace(1)* %in) { |

