summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGen/packed-structure.c
diff options
context:
space:
mode:
authorPete Cooper <peter_cooper@apple.com>2015-11-18 22:18:45 +0000
committerPete Cooper <peter_cooper@apple.com>2015-11-18 22:18:45 +0000
commit7bfd5cb7be04b6963aa7a587bb82b723f686c6b4 (patch)
treee507353f19f6e410b37fe94325a34557b6e3cb8a /clang/test/CodeGen/packed-structure.c
parent72bc23ef02bad3873d3572b2be529404a461d449 (diff)
downloadbcm5719-llvm-7bfd5cb7be04b6963aa7a587bb82b723f686c6b4.tar.gz
bcm5719-llvm-7bfd5cb7be04b6963aa7a587bb82b723f686c6b4.zip
Change memcpy/memset/memmove to have dest and source alignments.
This is a follow on from a similar LLVM commit: r253511. Note, this was reviewed (and more details are in) http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20151109/312083.html These intrinsics currently have an explicit alignment argument which is required to be a constant integer. It represents the alignment of the source and dest, and so must be the minimum of those. This change allows source and dest to each have their own alignments by using the alignment attribute on their arguments. The alignment argument itself is removed. The only code change to clang is hidden in CGBuilder.h which now passes both dest and source alignment to IRBuilder, instead of taking the minimum of dest and source alignments. Reviewed by Hal Finkel. llvm-svn: 253512
Diffstat (limited to 'clang/test/CodeGen/packed-structure.c')
-rw-r--r--clang/test/CodeGen/packed-structure.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/test/CodeGen/packed-structure.c b/clang/test/CodeGen/packed-structure.c
index 7d1183dc5ca..2885fdf107f 100644
--- a/clang/test/CodeGen/packed-structure.c
+++ b/clang/test/CodeGen/packed-structure.c
@@ -29,7 +29,7 @@ int s0_load_x(struct s0 *a) { return a->x; }
// CHECK-FUNCTIONS: ret i32 [[s0_load_y]]
int s0_load_y(struct s0 *a) { return a->y; }
// CHECK-FUNCTIONS-LABEL: define void @s0_copy
-// CHECK-FUNCTIONS: call void @llvm.memcpy.p0i8.p0i8.i64(i8* {{.*}}, i8* {{.*}}, i64 8, i32 4, i1 false)
+// CHECK-FUNCTIONS: call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 4 {{.*}}, i8* align 4 {{.*}}, i64 8, i1 false)
void s0_copy(struct s0 *a, struct s0 *b) { *b = *a; }
//
@@ -55,7 +55,7 @@ int s1_load_x(struct s1 *a) { return a->x; }
// CHECK-FUNCTIONS: ret i32 [[s1_load_y]]
int s1_load_y(struct s1 *a) { return a->y; }
// CHECK-FUNCTIONS-LABEL: define void @s1_copy
-// CHECK-FUNCTIONS: call void @llvm.memcpy.p0i8.p0i8.i64(i8* {{.*}}, i8* {{.*}}, i64 8, i32 1, i1 false)
+// CHECK-FUNCTIONS: call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 {{.*}}, i8* align 1 {{.*}}, i64 8, i1 false)
void s1_copy(struct s1 *a, struct s1 *b) { *b = *a; }
//
@@ -83,7 +83,7 @@ int s2_load_x(struct s2 *a) { return a->x; }
// CHECK-FUNCTIONS: ret i32 [[s2_load_y]]
int s2_load_y(struct s2 *a) { return a->y; }
// CHECK-FUNCTIONS-LABEL: define void @s2_copy
-// CHECK-FUNCTIONS: call void @llvm.memcpy.p0i8.p0i8.i64(i8* {{.*}}, i8* {{.*}}, i64 8, i32 2, i1 false)
+// CHECK-FUNCTIONS: call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 2 {{.*}}, i8* align 2 {{.*}}, i64 8, i1 false)
void s2_copy(struct s2 *a, struct s2 *b) { *b = *a; }
struct __attribute__((packed, aligned)) s3 {
OpenPOWER on IntegriCloud