[llvm] [NVPTX] Lower allocas to the local address space (PR #204346)

Tim Besard via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 17 06:15:15 PDT 2026


================
@@ -12,13 +12,12 @@ define void @foo(i32 %a) {
 ; PTX32-NEXT:    .local .align 4 .b8 __local_depot0[4];
 ; PTX32-NEXT:    .reg .b32 %SP;
 ; PTX32-NEXT:    .reg .b32 %SPL;
-; PTX32-NEXT:    .reg .b32 %r<3>;
+; PTX32-NEXT:    .reg .b32 %r<2>;
 ; PTX32-EMPTY:
 ; PTX32-NEXT:  // %bb.0:
 ; PTX32-NEXT:    mov.b32 %SPL, __local_depot0;
 ; PTX32-NEXT:    ld.param.b32 %r1, [foo_param_0];
-; PTX32-NEXT:    add.u32 %r2, %SPL, 0;
-; PTX32-NEXT:    st.local.b32 [%r2], %r1;
+; PTX32-NEXT:    st.local.b32 [%SPL], %r1;
----------------
maleadt wrote:

https://github.com/llvm/llvm-project/pull/204346#discussion_r3603408265

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


More information about the llvm-commits mailing list