[llvm] [NVPTX] Cleanup NVPTXLowerArgs, simplifying logic and improving alignment propagation (PR #180286)
Alex MacLean via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 12 19:46:34 PST 2026
================
@@ -4115,6 +4115,8 @@ SDValue NVPTXTargetLowering::LowerFormalArguments(
SDValue P;
if (isKernelFunction(F)) {
+ assert(isParamGridConstant(Arg) && "ByVal argument must be lowered to "
----------------
AlexMaclean wrote:
Yes it is. We mark all parameters as grid_constant now during LowerArgs so this assert now has the benefit of ensuring that LowerArgs is run. I think the assert is worth having as it ensures we're doing a correct lowering. The grid_constant attribute also serves the purpose of ensuring that if LowerArgs is run multiple times (perhaps we would want to experiment with it earlier in the optimization pipeline), it won't generate invalid code by trying to lower params multiple times.
https://github.com/llvm/llvm-project/pull/180286
More information about the llvm-commits
mailing list