[llvm] [NVPTX] Check Before inserting AddrSpaceCastInst in NVPTXLoweringAlloca (PR #106127)
Artem Belevich via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 4 11:44:43 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)
----------------
Artem-B wrote:
I'd prefer to see a positive check here matching what we *do* want to see.
Negative checks are rather fragile. E.g. an unintentional typo in what we match will makes them always succeed.
https://github.com/llvm/llvm-project/pull/106127
More information about the llvm-commits
mailing list