[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:00:10 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:
Negative checks are tricky to get right. In general, they should be done in a separate run with only negative checks and the positive 'anchor` checks around the areas of interest.
As written, if a per-field copy happens before `ld.param.u64` the test will still pass.
Autogenerated LLC checks capturing complete set of instructions would work best here, though the check generator has issues handling tests like these that combine llc and opt runs.
https://github.com/llvm/llvm-project/pull/110356
More information about the llvm-commits
mailing list