New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorrect codegen for int128 parameters with x64-systemv calling conv #59011
Comments
@llvm/issue-subscribers-clang-codegen |
There is a WIP patch that should fix this: https://reviews.llvm.org/D86310 |
I don't think that patch will fix this issue. This is not an alignment problem. |
Not the current patch, but I think resolving this is part of the wanted fix Also, this is related to #41784 |
Looks like https://reviews.llvm.org/D158169 is the patch to fix this? And it landed. So is this fixed? |
Unfortunately not yet - that fixes only the register passing component which means clang and GCC are now compatible, but the alignment produced by LLVM is still incorrect, so rust still isn't compatible. The fix for that is in https://reviews.llvm.org/D86310, which I think is just waiting for a review. So not yet but close :) |
Description
When compiling C/C++ code that takes an __int128 as its sixth argument, llvm splits it into two 64bit ints that get passed in a register and on the stack. According to the SysV ABI __int128 should be treated like a struct of two 64bit ints and therefore be passed completely in memory in that case.
Reproduction
https://godbolt.org/z/o8MMMYdY6
Input C++:
Output from clang 15:
Output from gcc 12:
The text was updated successfully, but these errors were encountered: