summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenOpenCL/amdgpu-features.cl
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/CodeGenOpenCL/amdgpu-features.cl')
-rw-r--r--clang/test/CodeGenOpenCL/amdgpu-features.cl12
1 files changed, 12 insertions, 0 deletions
diff --git a/clang/test/CodeGenOpenCL/amdgpu-features.cl b/clang/test/CodeGenOpenCL/amdgpu-features.cl
new file mode 100644
index 00000000000..a1815cedcd4
--- /dev/null
+++ b/clang/test/CodeGenOpenCL/amdgpu-features.cl
@@ -0,0 +1,12 @@
+// REQUIRES: amdgpu-registered-target
+
+// Check that appropriate features are defined for every supported AMDGPU
+// "-target" and "-mcpu" options.
+
+// RUN: %clang_cc1 -triple amdgcn -target-cpu gfx904 -S -emit-llvm -o - %s | FileCheck --check-prefix=GFX904 %s
+// RUN: %clang_cc1 -triple amdgcn -target-cpu gfx906 -S -emit-llvm -o - %s | FileCheck --check-prefix=GFX906 %s
+
+// GFX904: "target-features"="+16-bit-insts,+dpp,+fp32-denormals,+fp64-fp16-denormals,+gfx9-insts,+s-memrealtime"
+// GFX906: "target-features"="+16-bit-insts,+dl-insts,+dpp,+fp32-denormals,+fp64-fp16-denormals,+gfx9-insts,+s-memrealtime"
+
+kernel void test() {}
OpenPOWER on IntegriCloud