[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
       
    Tue Sep 17 02:35:33 PDT 2024
    
    
  
================
@@ -689,10 +689,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:
Thanks, added assert.
https://github.com/llvm/llvm-project/pull/94464
    
    
More information about the llvm-commits
mailing list