[llvm] [NVPTX][InferAS] assume alloca instructions are in local AS (PR #121710)
Artem Belevich via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 14 14:55:21 PST 2025
================
@@ -6,13 +6,13 @@
; Ensure we access the local stack properly
; PTX32: mov.u32 %SPL, __local_depot{{[0-9]+}};
-; PTX32: cvta.local.u32 %SP, %SPL;
; PTX32: ld.param.u32 %r{{[0-9]+}}, [foo_param_0];
-; PTX32: st.volatile.u32 [%SP], %r{{[0-9]+}};
+; PTX32: add.u32 %r[[SP_REG:[0-9]+]], %SPL, 0;
+; PTX32: st.local.u32 [%r[[SP_REG]]], %r{{[0-9]+}};
; PTX64: mov.u64 %SPL, __local_depot{{[0-9]+}};
-; PTX64: cvta.local.u64 %SP, %SPL;
; PTX64: ld.param.u32 %r{{[0-9]+}}, [foo_param_0];
-; PTX64: st.volatile.u32 [%SP], %r{{[0-9]+}};
+; PTX64: add.u64 %rd[[SP_REG:[0-9]+]], %SPL, 0;
----------------
Artem-B wrote:
Nit: We don't really need to add "0" and could just use `%SPL` directly. This is likely cosmetic, and makes no difference in SASS.
https://github.com/llvm/llvm-project/pull/121710
More information about the llvm-commits
mailing list