================
@@ -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:
It shouldn't be possible for a lifetime intrinsic to have an operand that isn't
the alloca itself (the verifier checks this now).
https://github.com/llvm/llvm-project/pull/191909
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits