diff options
author | Eli Friedman <eli.friedman@gmail.com> | 2012-08-29 21:21:11 +0000 |
---|---|---|
committer | Eli Friedman <eli.friedman@gmail.com> | 2012-08-29 21:21:11 +0000 |
commit | a484fc73ec6331bcaad092270b4ab9c8d1df23c3 (patch) | |
tree | 5bed6a84c642d621bf974cc2e40c5445a89af631 /test | |
parent | 600a513a0ff19c7dbedc4292866caddeceb94f57 (diff) |
Make alignment computation for pointer values for builtins handle
non-pointer types with a pointer representation correctly. PR13660.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162862 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r-- | test/CodeGenObjC/builtin-memfns.m | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/CodeGenObjC/builtin-memfns.m b/test/CodeGenObjC/builtin-memfns.m new file mode 100644 index 0000000000..b5c87d92dc --- /dev/null +++ b/test/CodeGenObjC/builtin-memfns.m @@ -0,0 +1,10 @@ +// RUN: %clang_cc1 -triple x86_64-apple-macosx10.8.0 -emit-llvm < %s| FileCheck %s + +void *memcpy(void *restrict s1, const void *restrict s2, unsigned long n); + +// PR13660 +void test1(int *a, id b) { + // CHECK: @test1 + // CHECK: call void @llvm.memcpy.p0i8.p0i8.i64(i8* {{.*}}, i8* {{.*}}, i64 8, i32 1, i1 false) + memcpy(a, b, 8); +} |