[PATCH] D142015: [LV] Plan with and without FoldTailByMasking

Sjoerd Meijer via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 26 00:46:22 PST 2023


SjoerdMeijer accepted this revision.
SjoerdMeijer added a comment.
This revision is now accepted and ready to land.

This makes a lot of sense to me, so with the nits addressed, this LGTM.
But wait a day in case there are other ideas about this.



================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorizationPlanner.h:182
 
 /// TODO: The following VectorizationFactor was pulled out of
 /// LoopVectorizationCostModel class. LV also deals with
----------------
This comment needs to be moved to line no. 224.


================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:7641
     // profitable to scalarize.
-    if (CM.selectUserVectorizationFactor(UserVF)) {
+    // TODOD: Should this compare tail folded vs non-tail-folded?
+    if (CM.selectUserVectorizationFactor(CM.mayFoldTailByMasking(), UserVF)) {
----------------
nit: TODO


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

https://reviews.llvm.org/D142015



More information about the llvm-commits mailing list