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

Harald van Dijk via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 20 10:52:47 PDT 2023


hvdijk added a comment.

In D86310#4519549 <https://reviews.llvm.org/D86310#4519549>, @tmgross wrote:

> Does this happen on the clang side or the LLVM side?

Definitely on the clang side, but...

> I built rustc against LLVM with your patch ([link to source](llvm.org/docs/LangRef.html#floating-point-types)) and it makes rustc compatible with clang (progress!) but it still seems not compatible with GCC. That is, after the patch rustc now seems to have an identical calling behavior to clang, so I'm thinking that maybe this behavior lies somewhere in LLVM and not the frontend?

...this suggests that potentially the same thing that clang is doing, LLVM is also doing independently. In which case, maybe it would be better to fix that at the same time: if we decide that LLVM's `i128` should match `__int128`, I'd rather have a single change to the ABI to make it match `__int128`, rather than incremental changes, because incremental changes make it more likely that someone is going to be using the intermediate version and relying on its ABI. It'll be a little while before I can look into this but I'll try to come up with a patch to apply on top of this if no one else gets to it first.

> Quick ABI check that demonstrates this https://github.com/tgross35/quick-abi-check, the outputs of note (clang-new is built with this patch):

Thanks, this is useful as an extra test.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D86310



More information about the llvm-commits mailing list