[PATCH] D144944: [GuardWidening] Make sure widened condition operands are available at insertion point
Dmitry Makogon via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 28 00:49:22 PST 2023
dmakogon added inline comments.
================
Comment at: llvm/lib/Transforms/Scalar/GuardWidening.cpp:555
ConstantInt::get(Cond0->getContext(), NewRHSAP);
+ assert(isAvailableAt(LHS, InsertPt) && "must be");
+ makeAvailableAt(LHS, InsertPt);
----------------
dmakogon wrote:
> mkazantsev wrote:
> > Why is that guaranteed?
> The caller must guarantee that `Cond0` and `Cond1` are available at `InsertPt` if it's not null.
> Generally we can always insert `Cond0 && Cond1` there, so availability must be guaranteed.
> The caller must guarantee that `Cond0` and `Cond1` are available at `InsertPt` if it's not null.
... and in this case `L` is an operand of `Cond0` so it must be available too.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D144944/new/
https://reviews.llvm.org/D144944
More information about the llvm-commits
mailing list