[llvm] [NVPTX] Check Before inserting AddrSpaceCastInst in NVPTXLoweringAlloca (PR #106127)

weiwei chen via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 5 19:34:01 PDT 2024


================
@@ -17,7 +17,22 @@ define void @kernel() {
   ret void
 }
 
+define void @alloca_in_explicit_local_as() {
+; LABEL: @lower_alloca_addrspace5
+; PTX-LABEL: .visible .func alloca_in_explicit_local_as(
+  %A = alloca i32, addrspace(5)
+; CHECK-NOT: addrspacecast ptr %A to ptr addrspace(5)
----------------
weiweichen wrote:

makes sense, adding a few positive checks to just to check the effect of `-nvptx-lower-alloca `

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


More information about the llvm-commits mailing list