[PATCH] D88659: [FE]Split SuitableAlign into two parts

James Y Knight via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Oct 10 14:03:17 PDT 2020


jyknight added a comment.

In D88659#2319636 <https://reviews.llvm.org/D88659#2319636>, @hubert.reinterpretcast wrote:

> In D88659#2318203 <https://reviews.llvm.org/D88659#2318203>, @jyknight wrote:
>
>> It seems like on AIX, `__BIGGEST_ALIGNMENT__` should just be set to 16, then. I'm not sure why you want it to be 8?
>
>
>
>   /// Return the alignment that is suitable for storing any
>   /// object with a fundamental alignment requirement.
>
> Vector types have extended (not fundamental) alignment on AIX, because `malloc` is not guaranteed to return addresses that are 16-byte aligned.

ISTM that comment may be incorrect. At least, the precedent set by GCC appears to be that BIGGEST_ALIGNMENT and alloca _both_ should follow vector alignment requirements of the selected ISA even when that is greater than any fundamental alignment requirement, and greater than malloc's alignment.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D88659/new/

https://reviews.llvm.org/D88659



More information about the cfe-commits mailing list