[PATCH] D65896: [LoopVectorize][X86] Clamp interleave factor if we have a known constant trip count that is less than VF*interleave

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 7 12:47:54 PDT 2019


fhahn added inline comments.


================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:5139
+  // If the trip count is constant, clamp the calculated IC to be between 1 and
+  // the trip count divided by VF.
+  if (TC > 0) {
----------------
It might be slightly less code if we set `MaxInterleaveCount = TC / VF;` before line 5137, if TC > 0. TC / VF should always be >= 1. It might be worth adding an assertion to make sure we don't miss any cases.


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

https://reviews.llvm.org/D65896





More information about the llvm-commits mailing list