diff options
Diffstat (limited to 'test/CodeGenOpenCL/builtins-r600.cl')
-rw-r--r-- | test/CodeGenOpenCL/builtins-r600.cl | 37 |
1 files changed, 33 insertions, 4 deletions
diff --git a/test/CodeGenOpenCL/builtins-r600.cl b/test/CodeGenOpenCL/builtins-r600.cl index cebeba185ea3..3e416b0323c2 100644 --- a/test/CodeGenOpenCL/builtins-r600.cl +++ b/test/CodeGenOpenCL/builtins-r600.cl @@ -1,5 +1,6 @@ // REQUIRES: r600-registered-target // RUN: %clang_cc1 -triple r600-unknown-unknown -S -emit-llvm -o - %s | FileCheck %s +// RUN: %clang_cc1 -triple amdgcn-unknown-unknown -S -emit-llvm -o - %s | FileCheck %s #pragma OPENCL EXTENSION cl_khr_fp64 : enable @@ -31,16 +32,16 @@ void test_div_scale_f32(global float* out, global int* flagout, float a, float b // CHECK-LABEL: @test_div_fmas_f32 // CHECK: call float @llvm.AMDGPU.div.fmas.f32 -void test_div_fmas_f32(global float* out, float a, float b, float c) +void test_div_fmas_f32(global float* out, float a, float b, float c, int d) { - *out = __builtin_amdgpu_div_fmasf(a, b, c); + *out = __builtin_amdgpu_div_fmasf(a, b, c, d); } // CHECK-LABEL: @test_div_fmas_f64 // CHECK: call double @llvm.AMDGPU.div.fmas.f64 -void test_div_fmas_f64(global double* out, double a, double b, double c) +void test_div_fmas_f64(global double* out, double a, double b, double c, int d) { - *out = __builtin_amdgpu_div_fmas(a, b, c); + *out = __builtin_amdgpu_div_fmas(a, b, c, d); } // CHECK-LABEL: @test_div_fixup_f32 @@ -112,3 +113,31 @@ void test_rsq_clamped_f64(global double* out, double a) { *out = __builtin_amdgpu_rsq_clamped(a); } + +// CHECK-LABEL: @test_ldexp_f32 +// CHECK: call float @llvm.AMDGPU.ldexp.f32 +void test_ldexp_f32(global float* out, float a, int b) +{ + *out = __builtin_amdgpu_ldexpf(a, b); +} + +// CHECK-LABEL: @test_ldexp_f64 +// CHECK: call double @llvm.AMDGPU.ldexp.f64 +void test_ldexp_f64(global double* out, double a, int b) +{ + *out = __builtin_amdgpu_ldexp(a, b); +} + +// CHECK-LABEL: @test_class_f32 +// CHECK: call i1 @llvm.AMDGPU.class.f32 +void test_class_f32(global float* out, float a, int b) +{ + *out = __builtin_amdgpu_classf(a, b); +} + +// CHECK-LABEL: @test_class_f64 +// CHECK: call i1 @llvm.AMDGPU.class.f64 +void test_class_f64(global double* out, double a, int b) +{ + *out = __builtin_amdgpu_class(a, b); +} |