[PATCH] D157529: [NFC][GuardUtils] Add util to extract widenable conditions
Anna Thomas via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 15 09:28:30 PDT 2023
anna accepted this revision.
anna added a comment.
This revision is now accepted and ready to land.
LGTM w/ comments.
================
Comment at: llvm/lib/Analysis/GuardUtils.cpp:160
+ // We require widenable_condition has only one use, otherwise we don't
+ // consider appropriate branch as widenable
+ if (isWidenableCondition(Check) && Check->hasOneUse()) {
----------------
================
Comment at: llvm/lib/Transforms/Scalar/LoopPredication.cpp:1124
+ if (L->contains(BI->getSuccessor(0))) {
+ assert(WC->hasOneUse());
+ WC->user_back()->replaceUsesOfWith(
----------------
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D157529/new/
https://reviews.llvm.org/D157529
More information about the llvm-commits
mailing list