[llvm] [LICM] Remove unnecessary check during store hoisting (PR #187529)
Antonio Frighetto via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 13 04:40:54 PDT 2026
================
@@ -277,6 +277,35 @@ exit:
ret i32 %val
}
+define i32 @unrelated_read(ptr noalias %loc, ptr noalias %otherloc) {
+; CHECK-LABEL: define i32 @unrelated_read(
+; CHECK-SAME: ptr noalias [[LOC:%.*]], ptr noalias [[OTHERLOC:%.*]]) {
+; CHECK-NEXT: [[ENTRY:.*]]:
+; CHECK-NEXT: call void @store(i32 0, ptr [[LOC]])
----------------
antoniofrighetto wrote:
Would it possibly make sense to add an equal test with the same opaque call, though without writeonly and argmemonly, showing that, the call, e.g., in the second iteration couldn't be coalesced into the call from the first iteration (as the first one wouldn't be dead? I guess something like: https://llvm.godbolt.org/z/4MncxqYjK).
https://github.com/llvm/llvm-project/pull/187529
More information about the llvm-commits
mailing list