From edd9756780adabb94c29c1286dc8098516b8e517 Mon Sep 17 00:00:00 2001 From: Matt Arsenault Date: Sat, 13 Feb 2016 01:03:09 +0000 Subject: [PATCH] AMDGPU: Update builtin for intrinsic change git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@260781 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/clang/Basic/BuiltinsAMDGPU.def | 4 ++-- lib/CodeGen/CGBuiltin.cpp | 6 +++--- test/CodeGenOpenCL/builtins-amdgcn.cl | 16 ++++++++-------- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/include/clang/Basic/BuiltinsAMDGPU.def b/include/clang/Basic/BuiltinsAMDGPU.def index c0c7f08ebd..ab7a01a7d0 100644 --- a/include/clang/Basic/BuiltinsAMDGPU.def +++ b/include/clang/Basic/BuiltinsAMDGPU.def @@ -27,8 +27,8 @@ BUILTIN(__builtin_amdgcn_rcp, "dd", "nc") BUILTIN(__builtin_amdgcn_rcpf, "ff", "nc") BUILTIN(__builtin_amdgcn_rsq, "dd", "nc") BUILTIN(__builtin_amdgcn_rsqf, "ff", "nc") -BUILTIN(__builtin_amdgcn_rsq_clamped, "dd", "nc") -BUILTIN(__builtin_amdgcn_rsq_clampedf, "ff", "nc") +BUILTIN(__builtin_amdgcn_rsq_clamp, "dd", "nc") +BUILTIN(__builtin_amdgcn_rsq_clampf, "ff", "nc") BUILTIN(__builtin_amdgcn_ldexp, "ddi", "nc") BUILTIN(__builtin_amdgcn_ldexpf, "ffi", "nc") BUILTIN(__builtin_amdgcn_class, "bdi", "nc") diff --git a/lib/CodeGen/CGBuiltin.cpp b/lib/CodeGen/CGBuiltin.cpp index 02b0bac419..46fabfd70a 100644 --- a/lib/CodeGen/CGBuiltin.cpp +++ b/lib/CodeGen/CGBuiltin.cpp @@ -7079,9 +7079,9 @@ Value *CodeGenFunction::EmitAMDGPUBuiltinExpr(unsigned BuiltinID, case AMDGPU::BI__builtin_amdgcn_rsq: case AMDGPU::BI__builtin_amdgcn_rsqf: return emitUnaryBuiltin(*this, E, Intrinsic::amdgcn_rsq); - case AMDGPU::BI__builtin_amdgcn_rsq_clamped: - case AMDGPU::BI__builtin_amdgcn_rsq_clampedf: - return emitUnaryBuiltin(*this, E, Intrinsic::amdgcn_rsq_clamped); + case AMDGPU::BI__builtin_amdgcn_rsq_clamp: + case AMDGPU::BI__builtin_amdgcn_rsq_clampf: + return emitUnaryBuiltin(*this, E, Intrinsic::amdgcn_rsq_clamp); case AMDGPU::BI__builtin_amdgcn_ldexp: case AMDGPU::BI__builtin_amdgcn_ldexpf: return emitFPIntBuiltin(*this, E, Intrinsic::amdgcn_ldexp); diff --git a/test/CodeGenOpenCL/builtins-amdgcn.cl b/test/CodeGenOpenCL/builtins-amdgcn.cl index 641ec8e0fd..4dffc84e58 100644 --- a/test/CodeGenOpenCL/builtins-amdgcn.cl +++ b/test/CodeGenOpenCL/builtins-amdgcn.cl @@ -99,18 +99,18 @@ void test_rsq_f64(global double* out, double a) *out = __builtin_amdgcn_rsq(a); } -// CHECK-LABEL: @test_rsq_clamped_f32 -// CHECK: call float @llvm.amdgcn.rsq.clamped.f32 -void test_rsq_clamped_f32(global float* out, float a) +// CHECK-LABEL: @test_rsq_clamp_f32 +// CHECK: call float @llvm.amdgcn.rsq.clamp.f32 +void test_rsq_clamp_f32(global float* out, float a) { - *out = __builtin_amdgcn_rsq_clampedf(a); + *out = __builtin_amdgcn_rsq_clampf(a); } -// CHECK-LABEL: @test_rsq_clamped_f64 -// CHECK: call double @llvm.amdgcn.rsq.clamped.f64 -void test_rsq_clamped_f64(global double* out, double a) +// CHECK-LABEL: @test_rsq_clamp_f64 +// CHECK: call double @llvm.amdgcn.rsq.clamp.f64 +void test_rsq_clamp_f64(global double* out, double a) { - *out = __builtin_amdgcn_rsq_clamped(a); + *out = __builtin_amdgcn_rsq_clamp(a); } // CHECK-LABEL: @test_ldexp_f32 -- 2.40.0