File tree Expand file tree Collapse file tree 4 files changed +21
-4
lines changed Expand file tree Collapse file tree 4 files changed +21
-4
lines changed Original file line number Diff line number Diff line change @@ -370,7 +370,6 @@ class LLVM_LIBRARY_VISIBILITY PPC32TargetInfo : public PPCTargetInfo {
370
370
SizeType = UnsignedLong;
371
371
PtrDiffType = SignedLong;
372
372
IntPtrType = SignedLong;
373
- SuitableAlign = 64 ;
374
373
LongDoubleWidth = 64 ;
375
374
LongDoubleAlign = DoubleAlign = 32 ;
376
375
LongDoubleFormat = &llvm::APFloat::IEEEdouble ();
@@ -409,7 +408,6 @@ class LLVM_LIBRARY_VISIBILITY PPC64TargetInfo : public PPCTargetInfo {
409
408
if (Triple.isOSAIX ()) {
410
409
// TODO: Set appropriate ABI for AIX platform.
411
410
DataLayout = " E-m:a-i64:64-n32:64" ;
412
- SuitableAlign = 64 ;
413
411
LongDoubleWidth = 64 ;
414
412
LongDoubleAlign = DoubleAlign = 32 ;
415
413
LongDoubleFormat = &llvm::APFloat::IEEEdouble ();
Original file line number Diff line number Diff line change
1
+ // RUN: %clang_cc1 -triple=powerpc-ibm-aix-xcoff -S -emit-llvm < %s | \
2
+ // RUN: FileCheck --check-prefix=32BIT %s
3
+
4
+ // RUN: %clang_cc1 -triple=powerpc64-ibm-aix-xcoff -S -emit-llvm < %s | \
5
+ // RUN: FileCheck --check-prefix=64BIT %s
6
+
7
+ typedef __SIZE_TYPE__ size_t ;
8
+ extern void * alloca (size_t __size ) __attribute__((__nothrow__ ));
9
+
10
+ void foo () {
11
+ char * ptr1 = (char * )alloca (sizeof (char ) * 9 );
12
+ char * ptr2 = (char * )alloca (sizeof (char ) * 32 );
13
+ }
14
+
15
+ // 32BIT: %0 = alloca i8, i32 9, align 16
16
+ // 32BIT: %1 = alloca i8, i32 32, align 16
17
+
18
+ // 64BIT: %0 = alloca i8, i64 9, align 16
19
+ // 64BIT: %1 = alloca i8, i64 32, align 16
Original file line number Diff line number Diff line change 398
398
// PPC-AIX:#define _LONG_LONG 1
399
399
// PPC-AIX-NOT:#define _LP64 1
400
400
// PPC-AIX:#define _POWER 1
401
- // PPC-AIX:#define __BIGGEST_ALIGNMENT__ 8
401
+ // PPC-AIX:#define __BIGGEST_ALIGNMENT__ 16
402
402
// PPC-AIX:#define __BIG_ENDIAN__ 1
403
403
// PPC-AIX:#define __BYTE_ORDER__ __ORDER_BIG_ENDIAN__
404
404
// PPC-AIX:#define __CHAR16_TYPE__ unsigned short
Original file line number Diff line number Diff line change 666
666
// PPC64-AIX:#define _LP64 1
667
667
// PPC64-AIX:#define _POWER 1
668
668
// PPC64-AIX:#define __64BIT__ 1
669
- // PPC64-AIX:#define __BIGGEST_ALIGNMENT__ 8
669
+ // PPC64-AIX:#define __BIGGEST_ALIGNMENT__ 16
670
670
// PPC64-AIX:#define __BIG_ENDIAN__ 1
671
671
// PPC64-AIX:#define __BYTE_ORDER__ __ORDER_BIG_ENDIAN__
672
672
// PPC64-AIX:#define __CHAR16_TYPE__ unsigned short
You can’t perform that action at this time.
0 commit comments