1; RUN: llc -march=amdgcn -verify-machineinstrs < %s | FileCheck --check-prefix=GCN %s 2 3; GCN-LABEL: {{^}}rcp_uint: 4; GCN: v_rcp_iflag_f32_e32 5define amdgpu_kernel void @rcp_uint(i32 addrspace(1)* %in, float addrspace(1)* %out) #0 { 6 %load = load i32, i32 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, float addrspace(1)* %out, align 4 10 ret void 11} 12 13; GCN-LABEL: {{^}}rcp_sint: 14; GCN: v_rcp_iflag_f32_e32 15define amdgpu_kernel void @rcp_sint(i32 addrspace(1)* %in, float addrspace(1)* %out) #0 { 16 %load = load i32, i32 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, float addrspace(1)* %out, align 4 20 ret void 21} 22 23; GCN-LABEL: {{^}}rcp_uint_denorm: 24; GCN-NOT: v_rcp_iflag_f32 25define amdgpu_kernel void @rcp_uint_denorm(i32 addrspace(1)* %in, float addrspace(1)* %out) #1 { 26 %load = load i32, i32 addrspace(1)* %in, align 4 27 %cvt = uitofp i32 %load to float 28 %div = fdiv float 1.000000e+00, %cvt 29 store float %div, float addrspace(1)* %out, align 4 30 ret void 31} 32 33; GCN-LABEL: {{^}}rcp_sint_denorm: 34; GCN-NOT: v_rcp_iflag_f32 35define amdgpu_kernel void @rcp_sint_denorm(i32 addrspace(1)* %in, float addrspace(1)* %out) #1 { 36 %load = load i32, i32 addrspace(1)* %in, align 4 37 %cvt = sitofp i32 %load to float 38 %div = fdiv float 1.000000e+00, %cvt 39 store float %div, float addrspace(1)* %out, align 4 40 ret void 41} 42 43!0 = !{float 2.500000e+00} 44 45attributes #0 = { "denormal-fp-math-f32"="preserve-sign,preserve-sign" } 46attributes #1 = { "denormal-fp-math-f32"="ieee,ieee" } 47