From 51ece4aae5857052d224ce52277924c74685714e Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Fri, 7 Aug 2015 23:02:44 +0000 Subject: Vendor import of clang trunk r242221: https://llvm.org/svn/llvm-project/cfe/trunk@242221 --- test/CodeGen/align-systemz.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'test/CodeGen/align-systemz.c') diff --git a/test/CodeGen/align-systemz.c b/test/CodeGen/align-systemz.c index 68a21e39ab36..eaa1de64d344 100644 --- a/test/CodeGen/align-systemz.c +++ b/test/CodeGen/align-systemz.c @@ -25,3 +25,19 @@ void func (void) s = es; } + +// Alignment should be respected for coerced argument loads + +struct arg { long y __attribute__((packed, aligned(4))); }; + +extern struct arg x; +void f(struct arg); + +void test (void) +{ + f(x); +} + +// CHECK-LABEL: @test +// CHECK: load i64, i64* getelementptr inbounds (%struct.arg, %struct.arg* @x, i32 0, i32 0), align 4 + -- cgit v1.3