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

Harald van Dijk via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue May 4 12:52:11 PDT 2021


hvdijk added a comment.
Herald added a subscriber: pengfei.

There is a risk of bitcode incompatibilities with this change, but we already have that the code we generate now is incompatible with GCC and results in crashes that way too, I don't think there's a perfect fix, I'd like it if we could merge this. I came up with roughly the same patch today, based on current sources, to fix bug #50198 before finding this one.



================
Comment at: llvm/lib/IR/AutoUpgrade.cpp:4323
+  // alignment. We'll handle them separately.
+  if (TT.isArch64Bit() && !DL.contains("-i128:128")) {
+    auto I = DL.find("-i64:64-");
----------------
This needs to not be limited to `TT.isArch64Bit()`. i128 needs 16-byte alignment on all targets, and although clang disables `__int128` for X86, we still use it for lowering f128.


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

https://reviews.llvm.org/D86310



More information about the cfe-commits mailing list