summaryrefslogtreecommitdiff
path: root/test/CodeGenOpenCL/lifetime.cl
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGenOpenCL/lifetime.cl')
-rw-r--r--test/CodeGenOpenCL/lifetime.cl15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/CodeGenOpenCL/lifetime.cl b/test/CodeGenOpenCL/lifetime.cl
new file mode 100644
index 000000000000..430e0582aeda
--- /dev/null
+++ b/test/CodeGenOpenCL/lifetime.cl
@@ -0,0 +1,15 @@
+// RUN: %clang_cc1 -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm -o - -triple amdgcn---amdgizcl %s | FileCheck %s -check-prefix=AMDGIZ
+
+void use(char *a);
+
+__attribute__((always_inline)) void helper_no_markers() {
+ char a;
+ use(&a);
+}
+
+void lifetime_test() {
+// CHECK: @llvm.lifetime.start.p0i
+// AMDGIZ: @llvm.lifetime.start.p5i
+ helper_no_markers();
+}