aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGenOpenCL/memcpy.cl
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGenOpenCL/memcpy.cl')
-rw-r--r--test/CodeGenOpenCL/memcpy.cl8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/CodeGenOpenCL/memcpy.cl b/test/CodeGenOpenCL/memcpy.cl
new file mode 100644
index 000000000000..cb27803adf41
--- /dev/null
+++ b/test/CodeGenOpenCL/memcpy.cl
@@ -0,0 +1,8 @@
+// RUN: %clang_cc1 %s -ffake-address-space-map -emit-llvm -o - | FileCheck %s
+
+// CHECK-LABEL: @test
+// CHECK-NOT: addrspacecast
+// CHECK: call void @llvm.memcpy.p1i8.p3i8
+kernel void test(global float *g, constant float *c) {
+ __builtin_memcpy(g, c, 32);
+}