[llvm] [NVPTX] Add missing `CHECK`s to `cp-async-bulk.ll` (NFC) (PR #125146)

Durgadoss R via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 31 05:16:44 PST 2025


================
@@ -131,6 +131,19 @@ define void @cp_async_bulk_prefetch(ptr addrspace(1) %src, i32 %size, i64 %ch) {
 ; CHECK-PTX64-NEXT:    cp.async.bulk.prefetch.L2.global.L2::cache_hint [%rd1], %r1, %rd2;
 ; CHECK-PTX64-NEXT:    cp.async.bulk.prefetch.L2.global [%rd1], %r1;
 ; CHECK-PTX64-NEXT:    ret;
+;
+; CHECK-PTX-SHARED32-LABEL: cp_async_bulk_prefetch(
+; CHECK-PTX-SHARED32:       {
+; CHECK-PTX-SHARED32-NEXT:    .reg .b32 %r<2>;
+; CHECK-PTX-SHARED32-NEXT:    .reg .b64 %rd<3>;
+; CHECK-PTX-SHARED32-EMPTY:
+; CHECK-PTX-SHARED32-NEXT:  // %bb.0:
+; CHECK-PTX-SHARED32-NEXT:    ld.param.u64 %rd1, [cp_async_bulk_prefetch_param_0];
+; CHECK-PTX-SHARED32-NEXT:    ld.param.u32 %r1, [cp_async_bulk_prefetch_param_1];
+; CHECK-PTX-SHARED32-NEXT:    ld.param.u64 %rd2, [cp_async_bulk_prefetch_param_2];
+; CHECK-PTX-SHARED32-NEXT:    cp.async.bulk.prefetch.L2.global.L2::cache_hint [%rd1], %r1, %rd2;
+; CHECK-PTX-SHARED32-NEXT:    cp.async.bulk.prefetch.L2.global [%rd1], %r1;
+; CHECK-PTX-SHARED32-NEXT:    ret;
----------------
durga4github wrote:

This does not require a separate SHARED32 check since this intrinsic has no shared memory pointer arguments.
I agree keeping both does not do any harm either. 

May be, the right thing is to move this test to a separate file (with only one set of checks)?

https://github.com/llvm/llvm-project/pull/125146


More information about the llvm-commits mailing list