[llvm] [NVPTX] Improve device function byval parameter lowering (PR #129188)
Artem Belevich via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 28 11:33:47 PST 2025
Artem-B wrote:
> Unfortunately the criteria for determining which case is possible are not correct, leading to miscompilations (https://godbolt.org/z/Gq1fP7a3G).
Can you elaborate on what exactly is incorrect about the example?
AFAICT, the code is still valid, even if ptxas itself has to make a copy: https://godbolt.org/z/ffd3d3G6z
My understanding is that ld.param from the parameter address is still legal and that we assumed that ptxas is smart enough to avoid local copies. Even if it does not, the code is still valid, even if it may be suboptimal.
https://github.com/llvm/llvm-project/pull/129188
More information about the llvm-commits
mailing list