]> granicus.if.org Git - clang/commitdiff
AMDGPU: Remove legacy ldexp builtin
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Fri, 15 Jul 2016 21:33:06 +0000 (21:33 +0000)
committerMatt Arsenault <Matthew.Arsenault@amd.com>
Fri, 15 Jul 2016 21:33:06 +0000 (21:33 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@275623 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Basic/BuiltinsAMDGPU.def
lib/CodeGen/CGBuiltin.cpp
test/CodeGenOpenCL/builtins-amdgcn.cl
test/CodeGenOpenCL/builtins-r600.cl

index 4656677e7c9b702051a61cae260c01808bd635cf..ea63ea10f84cce2b42e254aab293d8c0fbb0aa53 100644 (file)
@@ -99,12 +99,5 @@ BUILTIN(__builtin_r600_read_tidig_z, "Ui", "nc")
 BUILTIN(__builtin_r600_recipsqrt_ieee, "dd", "nc")
 BUILTIN(__builtin_r600_recipsqrt_ieeef, "ff", "nc")
 
-//===----------------------------------------------------------------------===//
-// Legacy names with amdgpu prefix
-//===----------------------------------------------------------------------===//
-
-BUILTIN(__builtin_amdgpu_ldexp, "ddi", "nc")
-BUILTIN(__builtin_amdgpu_ldexpf, "ffi", "nc")
-
 #undef BUILTIN
 #undef TARGET_BUILTIN
index dbff809ab5ed47a1b6f386c4ccd53926ad7342c7..c74e53ea84e07663272c6fb480088833de9dc3b9 100644 (file)
@@ -7690,14 +7690,6 @@ Value *CodeGenFunction::EmitAMDGPUBuiltinExpr(unsigned BuiltinID,
     return emitRangedBuiltin(*this, Intrinsic::r600_read_tidig_y, 0, 1024);
   case AMDGPU::BI__builtin_r600_read_tidig_z:
     return emitRangedBuiltin(*this, Intrinsic::r600_read_tidig_z, 0, 1024);
-
-   // Legacy amdgpu prefix
-  case AMDGPU::BI__builtin_amdgpu_ldexp:
-  case AMDGPU::BI__builtin_amdgpu_ldexpf: {
-    if (getTarget().getTriple().getArch() == Triple::amdgcn)
-      return emitFPIntBuiltin(*this, E, Intrinsic::amdgcn_ldexp);
-    return emitFPIntBuiltin(*this, E, Intrinsic::AMDGPU_ldexp);
-  }
   default:
     return nullptr;
   }
index 51f1586607085846b076146837db05d1aef62137..6cac2a44bc79a7f177136f04f25101ae71ea5f9c 100644 (file)
@@ -268,22 +268,6 @@ void test_read_exec(global ulong* out) {
 
 // CHECK: declare i64 @llvm.read_register.i64(metadata) #[[NOUNWIND_READONLY:[0-9]+]]
 
-// Legacy intrinsics with AMDGPU prefix
-
-// CHECK-LABEL: @test_legacy_ldexp_f32
-// CHECK: call float @llvm.amdgcn.ldexp.f32
-void test_legacy_ldexp_f32(global float* out, float a, int b)
-{
-  *out = __builtin_amdgpu_ldexpf(a, b);
-}
-
-// CHECK-LABEL: @test_legacy_ldexp_f64
-// CHECK: call double @llvm.amdgcn.ldexp.f64
-void test_legacy_ldexp_f64(global double* out, double a, int b)
-{
-  *out = __builtin_amdgpu_ldexp(a, b);
-}
-
 // CHECK-LABEL: @test_kernarg_segment_ptr
 // CHECK: call i8 addrspace(2)* @llvm.amdgcn.kernarg.segment.ptr()
 void test_kernarg_segment_ptr(__attribute__((address_space(2))) unsigned char ** out)
index 0951ff8182ef4e4e29677eb9e3d6e66ab25d5c54..027a54a6bce297452cc3e1a63813a8e469ffc7d8 100644 (file)
@@ -17,22 +17,6 @@ void test_recipsqrt_ieee_f64(global double* out, double a)
 }
 #endif
 
-// CHECK-LABEL: @test_legacy_ldexp_f32
-// CHECK: call float @llvm.AMDGPU.ldexp.f32
-void test_legacy_ldexp_f32(global float* out, float a, int b)
-{
-  *out = __builtin_amdgpu_ldexpf(a, b);
-}
-
-#if cl_khr_fp64
-// XCHECK-LABEL: @test_legacy_ldexp_f64
-// XCHECK: call double @llvm.AMDGPU.ldexp.f64
-void test_legacy_ldexp_f64(global double* out, double a, int b)
-{
-  *out = __builtin_amdgpu_ldexp(a, b);
-}
-#endif
-
 // CHECK-LABEL: @test_implicitarg_ptr
 // CHECK: call i8 addrspace(7)* @llvm.r600.implicitarg.ptr()
 void test_implicitarg_ptr(__attribute__((address_space(7))) unsigned char ** out)