[llvm] [NVPTX][InferAS] assume alloca instructions are in local AS (PR #121710)
Alex MacLean via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 24 14:28:58 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;
----------------
AlexMaclean wrote:
I agree this is an unsightly quirk. However, these stack pointer adds have been a part of how we handle frame indices in NVPTX for a long time and likely won't impact SASS at all. I think they're out of scope to fix in this MR (perhaps a good first issue @justinfargnoli)
https://github.com/llvm/llvm-project/pull/121710
More information about the llvm-commits
mailing list