[llvm] [VPlan] Add initial VPScalarEvolution, use to get trip count SCEV (NFC) (PR #94464)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 29 12:10:31 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);
----------------
fhahn wrote:
Yes, will also entail to remove the region and header phis.
https://github.com/llvm/llvm-project/pull/94464
More information about the llvm-commits
mailing list