Author: Matt Arsenault Date: 2022-12-22T08:43:15-05:00 New Revision: 9e0311561c8ed4df2d67a5a1fba16a148683c3c9
URL: https://github.com/llvm/llvm-project/commit/9e0311561c8ed4df2d67a5a1fba16a148683c3c9 DIFF: https://github.com/llvm/llvm-project/commit/9e0311561c8ed4df2d67a5a1fba16a148683c3c9.diff LOG: clang/HIP: Fix missing test for __frsqrt_rn Added: Modified: clang/test/Headers/__clang_hip_math.hip Removed: ################################################################################ diff --git a/clang/test/Headers/__clang_hip_math.hip b/clang/test/Headers/__clang_hip_math.hip index a8b95cb0f7b0..edc9731de9bb 100644 --- a/clang/test/Headers/__clang_hip_math.hip +++ b/clang/test/Headers/__clang_hip_math.hip @@ -767,6 +767,7 @@ extern "C" __device__ float test_exp2f(float x) { return exp2f(x); } +// // DEFAULT-LABEL: @test_exp2( // DEFAULT-NEXT: entry: // DEFAULT-NEXT: [[CALL_I:%.*]] = tail call contract double @__ocml_exp2_f64(double noundef [[X:%.*]]) #[[ATTR14]] @@ -3388,6 +3389,20 @@ extern "C" __device__ float test___frcp_rn(float x) { return __frcp_rn(x); } +// DEFAULT-LABEL: @test___frsqrt_rn( +// DEFAULT-NEXT: entry: +// DEFAULT-NEXT: [[TMP0:%.*]] = tail call contract float @llvm.amdgcn.rsq.f32(float [[X:%.*]]) +// DEFAULT-NEXT: ret float [[TMP0]] +// +// FINITEONLY-LABEL: @test___frsqrt_rn( +// FINITEONLY-NEXT: entry: +// FINITEONLY-NEXT: [[TMP0:%.*]] = tail call nnan ninf contract float @llvm.amdgcn.rsq.f32(float [[X:%.*]]) +// FINITEONLY-NEXT: ret float [[TMP0]] +// +extern "C" __device__ float test___frsqrt_rn(float x) { + return __frsqrt_rn(x); +} + // DEFAULT-LABEL: @test___fsqrt_rn( // DEFAULT-NEXT: entry: // DEFAULT-NEXT: [[CALL_I:%.*]] = tail call contract float @__ocml_native_sqrt_f32(float noundef [[X:%.*]]) #[[ATTR13]] _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits