clang/test/CodeGen/SystemZ/s390x-packed-struct-func-arg.c
raw| 1 | // RUN: %clang_cc1 -triple s390x-linux-gnu -target-cpu z13 -emit-llvm -o - %s \ |
| 2 | // RUN: | FileCheck %s |
| 3 | |
| 4 | struct S0 { |
| 5 | long f1; |
| 6 | int f2 : 4; |
| 7 | } d; |
| 8 | |
| 9 | #pragma pack(1) |
| 10 | struct S1 { |
| 11 | struct S0 S0_member; |
| 12 | }; |
| 13 | |
| 14 | void f(struct S0 arg) { |
| 15 | arg.f2 = 1; |
| 16 | } |
| 17 | |
| 18 | void g(void) { |
| 19 | struct S1 g; |
| 20 | // CHECK: alloca %struct.S0, align 8 |
| 21 | // CHECK: call void @llvm.memcpy.p0.p0.i64(ptr align 8 {{.*}}, ptr align 1 {{.*}}, i64 16 |
| 22 | f(g.S0_member); |
| 23 | } |