1 ; RUN: llc -mtriple=amdgcn -verify-machineinstrs < %s | FileCheck --check-prefix=GCN %s
3 ; GCN-LABEL: {{^}}rcp_uint:
4 ; GCN: v_rcp_iflag_f32_e32
5 define amdgpu_kernel void @rcp_uint(ptr addrspace(1) %in, ptr addrspace(1) %out) #0 {
6 %load = load i32, ptr addrspace(1) %in, align 4
7 %cvt = uitofp i32 %load to float
8 %div = fdiv float 1.000000e+00, %cvt, !fpmath !0
9 store float %div, ptr addrspace(1) %out, align 4
13 ; GCN-LABEL: {{^}}rcp_sint:
14 ; GCN: v_rcp_iflag_f32_e32
15 define amdgpu_kernel void @rcp_sint(ptr addrspace(1) %in, ptr addrspace(1) %out) #0 {
16 %load = load i32, ptr addrspace(1) %in, align 4
17 %cvt = sitofp i32 %load to float
18 %div = fdiv float 1.000000e+00, %cvt, !fpmath !0
19 store float %div, ptr addrspace(1) %out, align 4
23 ; GCN-LABEL: {{^}}rcp_uint_denorm:
24 ; GCN-NOT: v_rcp_iflag_f32
25 define amdgpu_kernel void @rcp_uint_denorm(ptr addrspace(1) %in, ptr addrspace(1) %out) #1 {
26 %load = load i32, ptr addrspace(1) %in, align 4
27 %cvt = uitofp i32 %load to float
28 %div = fdiv float 1.000000e+00, %cvt
29 store float %div, ptr addrspace(1) %out, align 4
33 ; GCN-LABEL: {{^}}rcp_sint_denorm:
34 ; GCN-NOT: v_rcp_iflag_f32
35 define amdgpu_kernel void @rcp_sint_denorm(ptr addrspace(1) %in, ptr addrspace(1) %out) #1 {
36 %load = load i32, ptr addrspace(1) %in, align 4
37 %cvt = sitofp i32 %load to float
38 %div = fdiv float 1.000000e+00, %cvt
39 store float %div, ptr addrspace(1) %out, align 4
43 !0 = !{float 2.500000e+00}
45 attributes #0 = { "denormal-fp-math-f32"="preserve-sign,preserve-sign" }
46 attributes #1 = { "denormal-fp-math-f32"="ieee,ieee" }