diff options
author | Tom Stellard <thomas.stellard@amd.com> | 2015-03-31 16:39:02 +0000 |
---|---|---|
committer | Tom Stellard <thomas.stellard@amd.com> | 2015-03-31 16:39:02 +0000 |
commit | b919c7d9eb8598b7f631c1edcd0b874bbdaf99d6 (patch) | |
tree | 43f14b55a031a8171ac44d23d72a1268e146f376 /clang/test/CodeGenOpenCL/memcpy.cl | |
parent | bf441f4ffa478bc7aacafa19e71c6cb32969c9de (diff) | |
download | bcm5719-llvm-b919c7d9eb8598b7f631c1edcd0b874bbdaf99d6.tar.gz bcm5719-llvm-b919c7d9eb8598b7f631c1edcd0b874bbdaf99d6.zip |
Sema: Accept pointers to any address space for builtin functions
As long as they don't have an address space explicitly defined.
This allows builtins with pointer arguments to be used with OpenCL.
llvm-svn: 233706
Diffstat (limited to 'clang/test/CodeGenOpenCL/memcpy.cl')
-rw-r--r-- | clang/test/CodeGenOpenCL/memcpy.cl | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/clang/test/CodeGenOpenCL/memcpy.cl b/clang/test/CodeGenOpenCL/memcpy.cl new file mode 100644 index 00000000000..cb27803adf4 --- /dev/null +++ b/clang/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); +} |