[PATCH] D57837: [LV] Prevent interleaving if computeMaxVF returned None.

Ayal Zaks via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 6 14:05:40 PST 2019


Ayal added inline comments.


================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:6116
   Optional<unsigned> MaybeMaxVF = CM.computeMaxVF(OptForSize);
   if (!MaybeMaxVF.hasValue()) // Cases considered too costly to vectorize.
+    return None;
----------------
Worth updating the comment, e.g., Cases that should not to be vectorized nor interleaved. And while touching the line, worth shortening to if (!MaybeMaxVF).


================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:7325
+  unsigned IC = 1;
+  unsigned UserIC = 1;
+  if (MaybeVF) {
----------------
UserIC should always be set to Hints.getInterleave().


================
Comment at: llvm/test/Transforms/LoopVectorize/no-interleave-up-front.ll:6
+
+define void @test1(i32 %n) #0 {
+; CHECK-LABEL: @test1(
----------------
Document where this test came from?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D57837





More information about the llvm-commits mailing list