diff --git a/llvm/lib/Support/SmallVector.cpp b/llvm/lib/Support/SmallVector.cpp --- a/llvm/lib/Support/SmallVector.cpp +++ b/llvm/lib/Support/SmallVector.cpp @@ -19,12 +19,21 @@ // Check that no bytes are wasted and everything is well-aligned. namespace { +#if defined(_AIX) && __open_xl_version__ >= 17 +struct Struct16B { + void *X __align(16); +}; +struct Struct32B { + void *X __align(32); +}; +#else struct Struct16B { alignas(16) void *X; }; struct Struct32B { alignas(32) void *X; }; +#endif } static_assert(sizeof(SmallVector) == sizeof(unsigned) * 2 + sizeof(void *),