summaryrefslogtreecommitdiff
path: root/test/CodeGenOpenCL/builtins-amdgcn-gfx9.cl
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGenOpenCL/builtins-amdgcn-gfx9.cl')
-rw-r--r--test/CodeGenOpenCL/builtins-amdgcn-gfx9.cl11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/CodeGenOpenCL/builtins-amdgcn-gfx9.cl b/test/CodeGenOpenCL/builtins-amdgcn-gfx9.cl
new file mode 100644
index 000000000000..333b610f81bd
--- /dev/null
+++ b/test/CodeGenOpenCL/builtins-amdgcn-gfx9.cl
@@ -0,0 +1,11 @@
+// REQUIRES: amdgpu-registered-target
+// RUN: %clang_cc1 -triple amdgcn-unknown-unknown -target-cpu gfx900 -S -emit-llvm -o - %s | FileCheck %s
+
+#pragma OPENCL EXTENSION cl_khr_fp16 : enable
+
+// CHECK-LABEL: @test_fmed3_f16
+// CHECK: call half @llvm.amdgcn.fmed3.f16(half %a, half %b, half %c)
+void test_fmed3_f16(global half* out, half a, half b, half c)
+{
+ *out = __builtin_amdgcn_fmed3h(a, b, c);
+}