[PATCH] D133017: [LV] Use SCEV to check if the trip count <= VF * UF.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Dec 18 04:16:41 PST 2022


fhahn marked 2 inline comments as done.
fhahn added inline comments.


================
Comment at: llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp:469
+  if (ExitCount->isZero() ||
+      !SE.isKnownPredicate(CmpInst::ICMP_ULE, ExitCount, C))
     return;
----------------
Ayal wrote:
> Could this be simplified using SE.getSmallConstantMaxTripCount(L)? Or a caching thereof.
`SE.getSmallConstantMaxTripCount(L)` only supports the case where the trip count is a constant, while `isKnownPredicate` supports the non-constant case as well.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D133017/new/

https://reviews.llvm.org/D133017



More information about the llvm-commits mailing list