[PATCH] D86310: [X86] Align i128 to 16 bytes in x86-64 datalayout

Craig Topper via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 21 13:35:05 PDT 2020


craig.topper added a comment.

In D86310#2231136 <https://reviews.llvm.org/D86310#2231136>, @efriedma wrote:

> I'm afraid the AutoUpgrade component of this isn't compatible with existing IR without some additional work.  I'm most concerned about cases like the following:
>
>   #pragma pack(8)
>   struct X { __int128 x; }; // Not a packed struct in IR because the native alignment is 8
>   struct Y { long long x; struct X y; }; // 24 bytes before autoupgrade, 32 bytes after
>   struct Y x;
>
>
>
> ------
>
> On a related note, we need to add "Fn8" to the x86 datalayout at some point.

I kind of feared that old IR was going to be a problem. Any thoughts on how to fix it? Do we need to visit every alloca/load/store/etc that don't have explicit alignment and force them to the old alignment?  Alternatively, could we skip the autoupgrade and weaken the compatible layout check somehow?


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

https://reviews.llvm.org/D86310



More information about the cfe-commits mailing list