[PATCH] D125029: [VPlan] Exit earlier when trying to widen with scalar VFs.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun May 22 12:22:33 PDT 2022


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


================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:8608
   if (isa<TruncInst>(Instr) &&
       (Recipe = tryToOptimizeInductionTruncate(cast<TruncInst>(Instr), Operands,
                                                Range, *Plan)))
----------------
Ayal wrote:
> isOptimizableIVTruncate may hold for VF=1?
Good point, kept the code before checking for scalar VFs. I also added a test in 419e49621fb4.


================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:8612
 
   if (!shouldWiden(Instr, Range))
     return nullptr;
----------------
Ayal wrote:
> (shouldWiden will bail out here for VF=1, if we didn’t bail out earlier)
Yep, even though it doesn't explicitly check for scalar VFs.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D125029



More information about the llvm-commits mailing list