[clang] [llvm] [NVPTX] Change the alloca address space in NVPTXLowerAlloca (PR #154814)

Theodoros Theodoridis via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 28 04:52:33 PDT 2025


================
@@ -139,21 +134,20 @@ define void @foo4() {
 ; PTX32-EMPTY:
 ; PTX32-NEXT:  // %bb.0:
 ; PTX32-NEXT:    mov.b32 %SPL, __local_depot3;
-; PTX32-NEXT:    cvta.local.u32 %SP, %SPL;
-; PTX32-NEXT:    add.u32 %r1, %SP, 0;
-; PTX32-NEXT:    add.u32 %r2, %SPL, 0;
-; PTX32-NEXT:    add.u32 %r3, %SP, 4;
-; PTX32-NEXT:    add.u32 %r4, %SPL, 4;
-; PTX32-NEXT:    st.local.b32 [%r2], 0;
-; PTX32-NEXT:    st.local.b32 [%r4], 0;
+; PTX32-NEXT:    add.u32 %r1, %SPL, 0;
+; PTX32-NEXT:    cvta.local.u32 %r2, %r1;
+; PTX32-NEXT:    add.u32 %r3, %SPL, 4;
+; PTX32-NEXT:    cvta.local.u32 %r4, %r3;
+; PTX32-NEXT:    st.local.b32 [%SPL], 0;
+; PTX32-NEXT:    st.local.b32 [%SPL+4], 0;
----------------
thetheodor wrote:

Fixed

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


More information about the llvm-commits mailing list