90 lines · c
1// REQUIRES: powerpc-registered-target2// RUN: %clang_cc1 -triple powerpc-unknown-aix -target-feature +altivec \3// RUN: -emit-llvm -o - %s | FileCheck --check-prefix=AIX32 %s4// RUN: %clang_cc1 -triple powerpc64-unknown-aix -target-feature +altivec \5// RUN: -emit-llvm -o - %s | FileCheck --check-prefix=AIX64 %s6 7typedef struct {8} Zero;9typedef struct {10 char c;11} One;12typedef struct {13 short s;14} Two;15typedef struct {16 char c[3];17} Three;18typedef struct {19 float f;20} Four;21typedef struct {22 char c[5];23} Five;24typedef struct {25 short s[3];26} Six;27typedef struct {28 char c[7];29} Seven;30typedef struct {31 long long l;32} Eight;33typedef struct {34 int i;35} __attribute__((aligned(32))) OverAligned;36typedef struct {37 int i;38 vector signed int vsi;39} StructVector;40 41// AIX32-LABEL: define void @arg0(ptr noundef byval(%struct.Zero) align 4 %x)42// AIX64-LABEL: define void @arg0(ptr noundef byval(%struct.Zero) align 8 %x)43void arg0(Zero x) {}44 45// AIX32-LABEL: define void @arg1(ptr noundef byval(%struct.One) align 4 %x)46// AIX64-LABEL: define void @arg1(ptr noundef byval(%struct.One) align 8 %x)47void arg1(One x) {}48 49// AIX32-LABEL: define void @arg2(ptr noundef byval(%struct.Two) align 4 %x)50// AIX64-LABEL: define void @arg2(ptr noundef byval(%struct.Two) align 8 %x)51void arg2(Two x) {}52 53// AIX32-LABEL: define void @arg3(ptr noundef byval(%struct.Three) align 4 %x)54// AIX64-LABEL: define void @arg3(ptr noundef byval(%struct.Three) align 8 %x)55void arg3(Three x) {}56 57// AIX32-LABEL: define void @arg4(ptr noundef byval(%struct.Four) align 4 %x)58// AIX64-LABEL: define void @arg4(ptr noundef byval(%struct.Four) align 8 %x)59void arg4(Four x) {}60 61// AIX32-LABEL: define void @arg5(ptr noundef byval(%struct.Five) align 4 %x)62// AIX64-LABEL: define void @arg5(ptr noundef byval(%struct.Five) align 8 %x)63void arg5(Five x) {}64 65// AIX32-LABEL: define void @arg6(ptr noundef byval(%struct.Six) align 4 %x)66// AIX64-LABEL: define void @arg6(ptr noundef byval(%struct.Six) align 8 %x)67void arg6(Six x) {}68 69// AIX32-LABEL: define void @arg7(ptr noundef byval(%struct.Seven) align 4 %x)70// AIX64-LABEL: define void @arg7(ptr noundef byval(%struct.Seven) align 8 %x)71void arg7(Seven x) {}72 73// AIX32-LABEL: define void @arg8(ptr noundef byval(%struct.Eight) align 4 %0)74// AIX32: %x = alloca %struct.Eight, align 875// AIX32: call void @llvm.memcpy.p0.p0.i3276// AIX64-LABEL: define void @arg8(ptr noundef byval(%struct.Eight) align 8 %x)77void arg8(Eight x) {}78 79// AIX32-LABEL: define void @arg9(ptr noundef byval(%struct.OverAligned) align 4 %0)80// AIX32: %x = alloca %struct.OverAligned, align 3281// AIX32: call void @llvm.memcpy.p0.p0.i3282// AIX64-LABEL: define void @arg9(ptr noundef byval(%struct.OverAligned) align 8 %0)83// AIX64: %x = alloca %struct.OverAligned, align 3284// AIX64: call void @llvm.memcpy.p0.p0.i6485void arg9(OverAligned x) {}86 87// AIX32-LABEL: define void @arg10(ptr noundef byval(%struct.StructVector) align 16 %x)88// AIX64-LABEL: define void @arg10(ptr noundef byval(%struct.StructVector) align 16 %x)89void arg10(StructVector x) {}90