[llvm] [VPlan] Add initial VPScalarEvolution, use to get trip count SCEV (NFC) (PR #94464)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 18 13:14:44 PDT 2024
================
@@ -683,10 +683,9 @@ void VPlanTransforms::optimizeForVFAndUF(VPlan &Plan, ElementCount BestVF,
m_BranchOnCond(m_Not(m_ActiveLaneMask(m_VPValue(), m_VPValue())))))
return;
- Type *IdxTy =
- Plan.getCanonicalIV()->getStartValue()->getLiveInIRValue()->getType();
- const SCEV *TripCount = createTripCountSCEV(IdxTy, PSE);
ScalarEvolution &SE = *PSE.getSE();
+ const SCEV *TripCount =
+ vputils::getSCEVExprForVPValue(Plan.getTripCount(), SE);
----------------
ayalz wrote:
BTW, independently - BOC below would better use an unconditional branch than BranchOnCond with `true` condition.
https://github.com/llvm/llvm-project/pull/94464
More information about the llvm-commits
mailing list