1 // REQUIRES: arm-registered-target
2 // RUN: %clang_cc1 -triple aarch64-none-elf \
4 // RUN: -emit-llvm -o - %s | FileCheck %s
8 // Base case, nothing interesting.
14 void f0m(long, long, long, long, long, S
);
18 f0m(1, 2, 3, 4, 5, s
);
20 // CHECK: define{{.*}} void @g0
21 // CHECK: call void @f0(i64 noundef 1, [2 x i64] [i64 6, i64 7]
22 // CHECK: call void @f0m{{.*}}[2 x i64] [i64 6, i64 7]
23 // CHECK: declare void @f0(i64 noundef, [2 x i64])
24 // CHECK: declare void @f0m(i64 noundef, i64 noundef, i64 noundef, i64 noundef, i64 noundef, [2 x i64])
26 // Aligned struct, passed according to its natural alignment.
27 struct __attribute__((aligned(16))) S16
{
32 void f1m(long, long, long, long, long, S16
);
36 f1m(1, 2, 3, 4, 5, s
);
38 // CHECK: define{{.*}} void @g1
39 // CHECK: call void @f1{{.*}}[2 x i64] [i64 6, i64 7]
40 // CHECK: call void @f1m{{.*}}[2 x i64] [i64 6, i64 7]
41 // CHECK: declare void @f1(i64 noundef, [2 x i64])
42 // CHECK: declare void @f1m(i64 noundef, i64 noundef, i64 noundef, i64 noundef, i64 noundef, [2 x i64])
44 // Increased natural alignment.
46 long x
__attribute__((aligned(16)));
51 void f3m(long, long, long, long, long, SF16
);
55 f3m(1, 2, 3, 4, 5, s
);
57 // CHECK: define{{.*}} void @g3
58 // CHECK: call void @f3(i64 noundef 1, i128 129127208515966861318)
59 // CHECK: call void @f3m(i64 noundef 1, i64 noundef 2, i64 noundef 3, i64 noundef 4, i64 noundef 5, i128 129127208515966861318)
60 // CHECK: declare void @f3(i64 noundef, i128)
61 // CHECK: declare void @f3m(i64 noundef, i64 noundef, i64 noundef, i64 noundef, i64 noundef, i128)
65 struct __attribute__((packed
)) P
{
71 void f4m(int, int, int, int, int, P
);
75 f4m(1, 2, 3, 4, 5, s
);
77 // CHECK: define{{.*}} void @g4()
78 // CHECK: call void @f4(i32 noundef 1, [2 x i64] [i64 30064771078, i64 0])
79 // CHECK: void @f4m(i32 noundef 1, i32 noundef 2, i32 noundef 3, i32 noundef 4, i32 noundef 5, [2 x i64] [i64 30064771078, i64 0])
80 // CHECK: declare void @f4(i32 noundef, [2 x i64])
81 // CHECK: declare void @f4m(i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, [2 x i64])
84 // Packed structure, overaligned, same as above.
85 struct __attribute__((packed
, aligned(16))) P16
{
91 void f5m(int, int, int, int, int, P16
);
95 f5m(1, 2, 3, 4, 5, s
);
97 // CHECK: define{{.*}} void @g5()
98 // CHECK: call void @f5(i32 noundef 1, [2 x i64] [i64 30064771078, i64 0])
99 // CHECK: void @f5m(i32 noundef 1, i32 noundef 2, i32 noundef 3, i32 noundef 4, i32 noundef 5, [2 x i64] [i64 30064771078, i64 0])
100 // CHECK: declare void @f5(i32 noundef, [2 x i64])
101 // CHECK: declare void @f5m(i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, [2 x i64])