[PATCH] D154264: [LV] Skip VFs < iterations remaining for epilogue vectorization.

Ayal Zaks via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 4 05:45:19 PDT 2023


Ayal added inline comments.
Herald added a subscriber: wangpc.


================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:5707
       EstimatedRuntimeVF *= *VScale;
   }
 
----------------
While we're here, should `EstimatedRuntimeVF` (or rather, `EstimatedMainLoopVF`) be used for both scalable and non-scalable `MainLoopVF` below?
Are all 4 combinations of main loop and epilog loop VF's being scalable or non-scalable, possible?
Can the filtering of VF's larger than `EstimatedMainLoopVF` be simplified into a single `ElementCount::isKnownGE(NextVF.Width, EstimatedMainLoopVF)` check for all combinations?
Is the SCEV `RemainingIterations` check relevant only for the {non-scalable & non-scalable} combination, or worth leaving a TODO?


================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:5724
 
+    // If NextVF is less than the number of remaining iterations, the epilogue
+    // loop would be dead. Skip such factors.
----------------
nit: reverse the condition to use ICMP_UGE as done above?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D154264



More information about the llvm-commits mailing list