summaryrefslogtreecommitdiff
path: root/test/SemaOpenCL/builtins-amdgcn-error-gfx9.cl
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaOpenCL/builtins-amdgcn-error-gfx9.cl')
-rw-r--r--test/SemaOpenCL/builtins-amdgcn-error-gfx9.cl9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/SemaOpenCL/builtins-amdgcn-error-gfx9.cl b/test/SemaOpenCL/builtins-amdgcn-error-gfx9.cl
new file mode 100644
index 000000000000..c9fd8ab2cae8
--- /dev/null
+++ b/test/SemaOpenCL/builtins-amdgcn-error-gfx9.cl
@@ -0,0 +1,9 @@
+// REQUIRES: amdgpu-registered-target
+// RUN: %clang_cc1 -triple amdgcn-- -target-cpu fiji -verify -S -o - %s
+
+#pragma OPENCL EXTENSION cl_khr_fp16 : enable
+
+void test_gfx9_fmed3h(global half *out, half a, half b, half c)
+{
+ *out = __builtin_amdgcn_fmed3h(a, b, c); // expected-error {{'__builtin_amdgcn_fmed3h' needs target feature gfx9-insts}}
+}