SizeType = UnsignedLong;
PtrDiffType = SignedLong;
IntPtrType = SignedLong;
- SuitableAlign = 64;
LongDoubleWidth = 64;
LongDoubleAlign = DoubleAlign = 32;
LongDoubleFormat = &llvm::APFloat::IEEEdouble();
if (Triple.isOSAIX()) {
// TODO: Set appropriate ABI for AIX platform.
DataLayout = "E-m:a-i64:64-n32:64";
- SuitableAlign = 64;
LongDoubleWidth = 64;
LongDoubleAlign = DoubleAlign = 32;
LongDoubleFormat = &llvm::APFloat::IEEEdouble();
--- /dev/null
+// RUN: %clang_cc1 -triple=powerpc-ibm-aix-xcoff -S -emit-llvm < %s | \
+// RUN: FileCheck --check-prefix=32BIT %s
+
+// RUN: %clang_cc1 -triple=powerpc64-ibm-aix-xcoff -S -emit-llvm < %s | \
+// RUN: FileCheck --check-prefix=64BIT %s
+
+typedef __SIZE_TYPE__ size_t;
+extern void *alloca(size_t __size) __attribute__((__nothrow__));
+
+void foo() {
+ char *ptr1 = (char *)alloca(sizeof(char) * 9);
+ char *ptr2 = (char *)alloca(sizeof(char) * 32);
+}
+
+// 32BIT: %0 = alloca i8, i32 9, align 16
+// 32BIT: %1 = alloca i8, i32 32, align 16
+
+// 64BIT: %0 = alloca i8, i64 9, align 16
+// 64BIT: %1 = alloca i8, i64 32, align 16
// PPC-AIX:#define _LONG_LONG 1
// PPC-AIX-NOT:#define _LP64 1
// PPC-AIX:#define _POWER 1
-// PPC-AIX:#define __BIGGEST_ALIGNMENT__ 8
+// PPC-AIX:#define __BIGGEST_ALIGNMENT__ 16
// PPC-AIX:#define __BIG_ENDIAN__ 1
// PPC-AIX:#define __BYTE_ORDER__ __ORDER_BIG_ENDIAN__
// PPC-AIX:#define __CHAR16_TYPE__ unsigned short
// PPC64-AIX:#define _LP64 1
// PPC64-AIX:#define _POWER 1
// PPC64-AIX:#define __64BIT__ 1
-// PPC64-AIX:#define __BIGGEST_ALIGNMENT__ 8
+// PPC64-AIX:#define __BIGGEST_ALIGNMENT__ 16
// PPC64-AIX:#define __BIG_ENDIAN__ 1
// PPC64-AIX:#define __BYTE_ORDER__ __ORDER_BIG_ENDIAN__
// PPC64-AIX:#define __CHAR16_TYPE__ unsigned short