Index: llvm/lib/Target/AMDGPU/AMDGPULibCalls.cpp =================================================================== --- llvm/lib/Target/AMDGPU/AMDGPULibCalls.cpp +++ llvm/lib/Target/AMDGPU/AMDGPULibCalls.cpp @@ -1446,15 +1446,7 @@ Res0 = tan(MATH_PI * opr0); return true; - case AMDGPULibFunc::EI_RECIP: - Res0 = 1.0 / opr0; - return true; - // two-arg functions - case AMDGPULibFunc::EI_DIVIDE: - Res0 = opr0 / opr1; - return true; - case AMDGPULibFunc::EI_POW: case AMDGPULibFunc::EI_POWR: Res0 = pow(opr0, opr1); Index: llvm/test/CodeGen/AMDGPU/simplify-libcalls.ll =================================================================== --- llvm/test/CodeGen/AMDGPU/simplify-libcalls.ll +++ llvm/test/CodeGen/AMDGPU/simplify-libcalls.ll @@ -135,7 +135,7 @@ declare <16 x float> @_Z3cosDv16_f(<16 x float>) ; GCN-LABEL: {{^}}define amdgpu_kernel void @test_native_recip -; GCN: store float 0x3FD5555560000000, ptr addrspace(1) %a +; GCN: %call = tail call fast float @_Z12native_recipf(float 3.000000e+00) define amdgpu_kernel void @test_native_recip(ptr addrspace(1) nocapture %a) { entry: %call = call fast float @_Z12native_recipf(float 3.000000e+00) @@ -146,7 +146,7 @@ declare float @_Z12native_recipf(float) ; GCN-LABEL: {{^}}define amdgpu_kernel void @test_half_recip -; GCN: store float 0x3FD5555560000000, ptr addrspace(1) %a +; GCN: %call = tail call fast float @_Z10half_recipf(float 3.000000e+00) define amdgpu_kernel void @test_half_recip(ptr addrspace(1) nocapture %a) { entry: %call = call fast float @_Z10half_recipf(float 3.000000e+00)