================
@@ -546,9 +546,32 @@ static void removeIntrinsicUsers(AllocaInst *AI) {
Inst->dropDroppableUse(UU);
continue;
}
+
+ // Replace lifetime markers with a store of undef so that mem2reg sees
+ // the alloca as having an undefined value at that point. This allows
+ // it to break unnecessary back-edge PHI nodes created when the alloca
+ // is reused across loop iterations.
+ if (auto *II = dyn_cast<IntrinsicInst>(Inst))
----------------
efriedma-quic wrote:
I think "droppable" instructions can still reach this for loop?
But this point in the loop shouldn't be reachable, yes.
https://github.com/llvm/llvm-project/pull/191909
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits