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.
25 // Make sure we do generate a memcpy when we cannot guarantee alignment.
27 int a
,b
,c
,d
,e
,f
,g
,h
,i
,j
,k
,l
;
29 void test2a(struct Test3S q
);
30 // CHECK-LABEL: define{{.*}} void @test2(
31 // CHECK: alloca %struct.Test3S, align 8
33 // CHECK: call void @test2a
34 void test2(struct Test3S
*q
) {
38 // But make sure we don't generate a memcpy when we can guarantee alignment.
40 // CHECK-LABEL: define{{.*}} void @test3(
41 // CHECK: alloca %struct.Test3S, align 8
42 // CHECK: call void @fooey
44 // CHECK: call void @test2a
46 // CHECK: call void @test2a
47 void test3(struct Test3S a
) {