[llvm-branch-commits] [LSR] Add more instructions to DeadInsts in RewriteForPHI (PR #237532)

Aiden Grossman via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Wed Nov 4 13:59:00 PST 2026


================
@@ -6120,6 +6120,10 @@ void LSRInstance::RewriteForPHI(PHINode *PN, const LSRUse &LU,
           if (L->contains(I) && !L->contains(BB))
             InsertedNonLCSSAInsts.insert(I);
 
+        if (auto *OldIncomingInst =
----------------
boomanaiden154 wrote:

Good point. Updated so that we only add to `DeadInsts` if we call SplitCriticalEdge` and we're successful.

Doing it there rather than `needUpdateFixups` I think makes the most sense, although either should be equivalent.

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


More information about the llvm-branch-commits mailing list