rnk added a comment.

In D75903#1914715 <https://reviews.llvm.org/D75903#1914715>, @ostannard wrote:

> This means that `stk1` should be passed as a copy with alignment 16 bytes, 
> putting it at `sp+16`. GCC does this, clang without this patch passes it at 
> `sp+8`, and clang with this patch passes it at `sp+32`.


MSVC puts it at `sp+8`: https://gcc.godbolt.org/z/aAku9j

They allegedly follow this same document. Either way, we need to remain 
compatible.

Given that neither GCC nor MSVC do things they way you are proposing, are you 
sure this is correct? What compiler does this change make us more compatible 
with?

I don't believe there is an issue from the user's standpoint, since Clang 
copies the entire argument into an appropriately aligned alloca. If it is 
address-taken and stored to, there will not be any faults.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D75903



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to