[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:39:28 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);
----------------
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.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D144944/new/

https://reviews.llvm.org/D144944



More information about the llvm-commits mailing list