[llvm] [NVPTX] Cleanup support for atomic loads/stores (PR #201468)

via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 25 05:10:44 PDT 2026


================
@@ -404,39 +404,39 @@ define void @generic_sc_cluster(ptr %a, ptr %b, ptr %c, ptr %d, ptr %e) local_un
 ; CHECK-NEXT:  // %bb.0:
 ; CHECK-NEXT:    ld.param.b64 %rd1, [generic_sc_cluster_param_0];
 ; CHECK-NEXT:    fence.sc.cluster;
-; CHECK-NEXT:    ld.acquire.cluster.b8 %rs1, [%rd1];
 ; CHECK-NEXT:    ld.param.b64 %rd2, [generic_sc_cluster_param_1];
-; CHECK-NEXT:    add.s16 %rs2, %rs1, 1;
+; CHECK-NEXT:    ld.acquire.cluster.b8 %rs1, [%rd1];
----------------
gonzalobg wrote:

`ld.param` reads data that is read-only (the kernel params) so the compiler should be free to move these across all fences. Similar for `local` accesses, which are thread-private.

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


More information about the llvm-commits mailing list