[llvm] [NVTPX] Copy kernel arguments as byte array (PR #110356)
Artem Belevich via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 7 11:21:06 PDT 2024
================
@@ -33,6 +33,15 @@ entry:
ret void
}
+; Check that nvptx-lower-args copies padding as the struct may have been a union
+; COMMON-LABEL: load_padding
+define void @load_padding(ptr nocapture readonly byval(%class.padded) %arg) {
+; PTX: ld.param.u64
+; PTX-NOT: ld.param.u8
+; PTX-NOT: ld.param.u32
----------------
Artem-B wrote:
That would still check for "one thing looks right" while it would ignore all the things that may have gone wrong (and catching the things that are wrong is arguably as important as verifying the things that we expect to happen).
E.g. that redundant re-load from the local memory, now eliminated by your patch, would be ignored, if it were still around. So, your test may have checked for ld.param.u64 while we'd be copying into that local array, but would not notice if we'd re-load from that array field-by-field.
This case is trivial, so I'd just run the update_llc_test_checks.py on the test and use the checks it produced, possibly restoring OPT checks if they get nuked in the process. One of the days we should teach `update_test_checks.py` and `update_llc_test_checks.py` to coexist in the same test file.
https://github.com/llvm/llvm-project/pull/110356
More information about the llvm-commits
mailing list