[PATCH] D87679: [LV] Unroll factor is expected to be > 0

Evgeniy via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 12 21:48:25 PDT 2020


ebrevnov added inline comments.


================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:5622
+  assert(IC > 0 && "Interleave count must be greater than 0.");
+
   // If we did not calculate the cost for VF (because the user selected the VF)
----------------
Ayal wrote:
> nit: suffice to only introduce the
> ```
>   assert(MaxInterleaveCount > 0 &&
>          "Maximum interleave count must be greater than 0");
> ```
> in the above change hunk, right?
> 
> Thanks!
That was done intentionally. By sanitizing IC value as early as possible we avoid potential issues with using incorrect value. This is similar in spirit to what is done for MaxInterliveCount.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D87679



More information about the llvm-commits mailing list