[llvm] [VPlan] Add initial VPScalarEvolution, use to get trip count SCEV (NFC) (PR #94464)

via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 18 00:57:54 PDT 2024


================
@@ -916,12 +925,11 @@ VPlanPtr VPlan::createInitialVPlan(const SCEV *TripCount, ScalarEvolution &SE,
   // debugging. Eg. if the compare has got a line number inside the loop.
   VPBuilder Builder(MiddleVPBB);
   VPValue *Cmp =
-      TailFolded
-          ? Plan->getOrAddLiveIn(ConstantInt::getTrue(
-                IntegerType::getInt1Ty(TripCount->getType()->getContext())))
-          : Builder.createICmp(CmpInst::ICMP_EQ, Plan->getTripCount(),
-                               &Plan->getVectorTripCount(),
-                               ScalarLatchTerm->getDebugLoc(), "cmp.n");
+      TailFolded ? Plan->getOrAddLiveIn(ConstantInt::getTrue(
----------------
ayalz wrote:

nit: if the inlined block is unboxed, this change can be avoided.

https://github.com/llvm/llvm-project/pull/94464


More information about the llvm-commits mailing list