1 // RUN: %clang_cc1 -emit-llvm -triple x86_64-apple-darwin10 < %s | FileCheck %s
13 // Make sure we don't generate extra memcpy for lvalues
14 void test1a(struct Test1S, struct Test2S);
15 // CHECK-LABEL: define void @test1(
17 // CHECK: call void @test1a
18 void test1(struct Test1S *A, struct Test2S *B) {
22 // The above gets tricker when the byval argument requires higher alignment
23 // than the natural alignment of the type in question.
26 // Make sure we do generate a memcpy when we cannot guarantee alignment.
28 int a,b,c,d,e,f,g,h,i,j,k,l;
30 void test2a(struct Test3S q);
31 // CHECK-LABEL: define void @test2(
32 // CHECK: alloca %struct.Test3S, align 8
34 // CHECK: call void @test2a
35 void test2(struct Test3S *q) {
39 // But make sure we don't generate a memcpy when we can guarantee alignment.
41 // CHECK-LABEL: define void @test3(
42 // CHECK: alloca %struct.Test3S, align 8
43 // CHECK: call void @fooey
45 // CHECK: call void @test2a
47 // CHECK: call void @test2a
48 void test3(struct Test3S a) {