[PATCH] D86310: [X86] Align i128 to 16 bytes in x86 datalayouts

Nikita Popov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 20 03:48:35 PDT 2023


nikic added a comment.

In D86310#4648646 <https://reviews.llvm.org/D86310#4648646>, @hvdijk wrote:

> In D86310#4648634 <https://reviews.llvm.org/D86310#4648634>, @nikic wrote:
>
>> I'm happy to sign off on the x86-64 part here, but I'm less sure about x86-32. If I understood correctly, the i128 alignment is raised there exclusively to fix the "f128 legalized to i128 libcall" case -- is there any other ABI requirement for i128 alignment on x86-32? Is raising i128 alignment the right way to fix an f128 issue?
>
> GCC does not support `__int128` on x86-32, but clang has the `-fforce-enable-int128` option, and when that is used, it gives it the same 16-byte alignment that it does on x86-64, so even ignoring the `_Float128` issue, I think the change is right for x86-32.

Okay, that's a compelling argument.



================
Comment at: llvm/lib/IR/AutoUpgrade.cpp:5233
+      SmallVector<StringRef, 4> Groups;
+      Regex R("(.*-i64:64)(-.*)");
+      if (R.match(Res, &Groups))
----------------
I don't think this will work for the 32-bit targets that don't have `-i64:64`.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D86310



More information about the cfe-commits mailing list