[PATCH] D114528: [LV] Make sure VF doesn't exceed compile time known TC

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 3 03:05:26 PST 2021


dmgreen added inline comments.


================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:6085
+                         "exceeding the constant trip count: "
                       << ConstTripCount << "\n");
+    return ElementCount::getFixed(PowerOf2Floor(ConstTripCount));
----------------
fhahn wrote:
> Shouldn't this be `PowerOf2Floor(ConstTripCount)`? 
I think this is saying "the trip count is "ConstTripCount", so we are rounding that down to a power of 2 (left as an exercise to the reader)."

It may be better to be clearer about the values it will use though. Having what it thinks the original ConstTripCount printed somewhere does sound useful.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D114528



More information about the llvm-commits mailing list