llvm.org GIT mirror llvm / a47e87a
AMDGPU: Remove AMDGPU.ldexp git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275618 91177308-0d34-0410-b5e6-96231b3b80d8 Matt Arsenault 4 years ago
3 changed file(s) with 0 addition(s) and 32 deletion(s). Raw diff Collapse all Expand all
6464 >;
6565
6666 } // End TargetPrefix = "r600"
67
68 // FIXME: These should be renamed/moved to r600
69 let TargetPrefix = "AMDGPU" in {
70 def int_AMDGPU_ldexp : Intrinsic<
71 [llvm_anyfloat_ty], [LLVMMatchType<0>, llvm_i32_ty], [IntrNoMem]
72 >;
73 }
7467
7568 let TargetPrefix = "amdgcn" in {
7669
924924 case AMDGPUIntrinsic::AMDGPU_clamp: // Legacy name.
925925 return DAG.getNode(AMDGPUISD::CLAMP, DL, VT,
926926 Op.getOperand(1), Op.getOperand(2), Op.getOperand(3));
927
928 case Intrinsic::AMDGPU_ldexp: // Legacy name
929 return DAG.getNode(AMDGPUISD::LDEXP, DL, VT, Op.getOperand(1),
930 Op.getOperand(2));
931927
932928 case AMDGPUIntrinsic::AMDGPU_bfe_i32:
933929 return DAG.getNode(AMDGPUISD::BFE_I32, DL, VT,
22
33 declare float @llvm.amdgcn.ldexp.f32(float, i32) nounwind readnone
44 declare double @llvm.amdgcn.ldexp.f64(double, i32) nounwind readnone
5
6 declare float @llvm.AMDGPU.ldexp.f32(float, i32) nounwind readnone
7 declare double @llvm.AMDGPU.ldexp.f64(double, i32) nounwind readnone
85
96 ; SI-LABEL: {{^}}test_ldexp_f32:
107 ; SI: v_ldexp_f32
2421 ret void
2522 }
2623
27 ; SI-LABEL: {{^}}test_legacy_ldexp_f32:
28 ; SI: v_ldexp_f32
29 ; SI: s_endpgm
30 define void @test_legacy_ldexp_f32(float addrspace(1)* %out, float %a, i32 %b) nounwind {
31 %result = call float @llvm.AMDGPU.ldexp.f32(float %a, i32 %b) nounwind readnone
32 store float %result, float addrspace(1)* %out, align 4
33 ret void
34 }
35
36 ; SI-LABEL: {{^}}test_legacy_ldexp_f64:
37 ; SI: v_ldexp_f64
38 ; SI: s_endpgm
39 define void @test_legacy_ldexp_f64(double addrspace(1)* %out, double %a, i32 %b) nounwind {
40 %result = call double @llvm.AMDGPU.ldexp.f64(double %a, i32 %b) nounwind readnone
41 store double %result, double addrspace(1)* %out, align 8
42 ret void
43 }
44
4524 ; SI-LABEL: {{^}}test_ldexp_undef_f32:
4625 ; SI-NOT: v_ldexp_f32
4726 define void @test_ldexp_undef_f32(float addrspace(1)* %out, i32 %b) nounwind {