// REQUIRES: powerpc-registered-target
// RUN: %clang_cc1 -no-opaque-pointers -triple powerpc-unknown-freebsd \
// RUN: -emit-llvm -o - %s | FileCheck %s --check-prefix=CHECK-SVR4
// RUN: %clang_cc1 -no-opaque-pointers -triple powerpcle-unknown-freebsd \
// RUN: -emit-llvm -o - %s | FileCheck %s --check-prefix=CHECK-SVR4
// RUN: %clang_cc1 -no-opaque-pointers -triple powerpc-unknown-aix \
// RUN: -emit-llvm -o - %s | FileCheck %s --check-prefix=CHECK-AIX
// RUN: %clang_cc1 -no-opaque-pointers -triple powerpc64-unknown-aix \
// RUN: -emit-llvm -o - %s | FileCheck %s --check-prefix=CHECK-AIX
// RUN: %clang_cc1 -no-opaque-pointers -triple powerpc-unknown-linux \
// RUN: -emit-llvm -o - %s | FileCheck %s --check-prefix=CHECK-AIX
// RUN: %clang_cc1 -no-opaque-pointers -triple powerpc-unknown-linux -maix-struct-return \
// RUN: -emit-llvm -o - %s | FileCheck %s --check-prefix=CHECK-AIX
// RUN: %clang_cc1 -no-opaque-pointers -triple powerpc-unknown-linux -msvr4-struct-return \
// RUN: -emit-llvm -o - %s | FileCheck %s --check-prefix=CHECK-SVR4
// RUN: %clang_cc1 -no-opaque-pointers -triple powerpcle-unknown-linux \
// RUN: -emit-llvm -o - %s | FileCheck %s --check-prefix=CHECK-AIX
// RUN: %clang_cc1 -no-opaque-pointers -triple powerpcle-unknown-linux -maix-struct-return \
// RUN: -emit-llvm -o - %s | FileCheck %s --check-prefix=CHECK-AIX
// RUN: %clang_cc1 -no-opaque-pointers -triple powerpcle-unknown-linux -msvr4-struct-return \
// RUN: -emit-llvm -o - %s | FileCheck %s --check-prefix=CHECK-SVR4
// RUN: %clang_cc1 -no-opaque-pointers -triple powerpc-unknown-netbsd \
// RUN: -emit-llvm -o - %s | FileCheck %s --check-prefix=CHECK-SVR4
// RUN: %clang_cc1 -no-opaque-pointers -triple powerpc-unknown-openbsd \
// RUN: -emit-llvm -o - %s | FileCheck %s --check-prefix=CHECK-SVR4
// RUN: %clang_cc1 -no-opaque-pointers -triple powerpc-unknown-openbsd -maix-struct-return \
// RUN: -emit-llvm -o - %s | FileCheck %s --check-prefix=CHECK-AIX
// RUN: %clang_cc1 -no-opaque-pointers -triple powerpc-unknown-openbsd -msvr4-struct-return \
// RUN: -emit-llvm -o - %s | FileCheck %s --check-prefix=CHECK-SVR4
typedef struct Zero;
typedef struct One;
typedef struct Two;
typedef struct Three;
typedef struct Four; // svr4 to return i32, not float
typedef struct Five;
typedef struct Six;
typedef struct Seven;
typedef struct Eight; // padded for alignment
typedef struct Nine;
// CHECK-AIX-LABEL: define{{.*}} void @ret0(%struct.Zero* noalias sret(%struct.Zero) {{[^,]*}})
// CHECK-SVR4-LABEL: define{{.*}} void @ret0()
Zero
// CHECK-AIX-LABEL: define{{.*}} void @ret1(%struct.One* noalias sret(%struct.One) {{[^,]*}})
// CHECK-SVR4-LABEL: define{{.*}} i8 @ret1()
One
// CHECK-AIX-LABEL: define{{.*}} void @ret2(%struct.Two* noalias sret(%struct.Two) {{[^,]*}})
// CHECK-SVR4-LABEL: define{{.*}} i16 @ret2()
Two
// CHECK-AIX-LABEL: define{{.*}} void @ret3(%struct.Three* noalias sret(%struct.Three) {{[^,]*}})
// CHECK-SVR4-LABEL: define{{.*}} i24 @ret3()
Three
// CHECK-AIX-LABEL: define{{.*}} void @ret4(%struct.Four* noalias sret(%struct.Four) {{[^,]*}})
// CHECK-SVR4-LABEL: define{{.*}} i32 @ret4()
Four
// CHECK-AIX-LABEL: define{{.*}} void @ret5(%struct.Five* noalias sret(%struct.Five) {{[^,]*}})
// CHECK-SVR4-LABEL: define{{.*}} i40 @ret5()
Five
// CHECK-AIX-LABEL: define{{.*}} void @ret6(%struct.Six* noalias sret(%struct.Six) {{[^,]*}})
// CHECK-SVR4-LABEL: define{{.*}} i48 @ret6()
Six
// CHECK-AIX-LABEL: define{{.*}} void @ret7(%struct.Seven* noalias sret(%struct.Seven) {{[^,]*}})
// CHECK-SVR4-LABEL: define{{.*}} i56 @ret7()
Seven
// CHECK-AIX-LABEL: define{{.*}} void @ret8(%struct.Eight* noalias sret(%struct.Eight) {{[^,]*}})
// CHECK-SVR4-LABEL: define{{.*}} i64 @ret8()
Eight
// CHECK-AIX-LABEL: define{{.*}} void @ret9(%struct.Nine* noalias sret(%struct.Nine) {{[^,]*}})
// CHECK-SVR4-LABEL: define{{.*}} void @ret9(%struct.Nine* noalias sret(%struct.Nine) {{[^,]*}})
Nine