[PATCH] D98469: [NVPTX] Avoid temp copy of byval kernel parameters.
Artem Belevich via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 12 14:54:54 PST 2021
tra added inline comments.
================
Comment at: llvm/test/CodeGen/NVPTX/lower-kernel-ptr-arg.ll:35
; CHECK: cvta.to.global.u64 %[[optr_g:.*]], %[[optr]];
; CHECK: ld.param.u64 %[[iptr:rd.*]], [ptr_in_byval_kernel_param_0+8]
; CHECK: cvta.to.global.u64 %[[iptr_g:.*]], %[[iptr]];
----------------
With a temporary copy of the argument, the alignment used to be inferred to be 8 based on the struct alignment and that allowed LLVM to generate 64-bit load. W/o a temporary copy, we're only looking at the load's alignment of 4, which probably evolved from the original 32-bit IR.
Making load alignment to be 8 makes the test work predictably regardless of whether we have a temp copy.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D98469/new/
https://reviews.llvm.org/D98469
More information about the llvm-commits
mailing list