[PATCH] D80085: [LV] Fix FoldTail under user VF and UF

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun May 17 10:06:58 PDT 2020


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

LGTM, thanks! It could be beneficial to move the UserVF handling directly to computeFeasibleMaxVF (see inline comment), but either approach should be fine!



================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:4972
   case CM_ScalarEpilogueAllowed:
-    return computeFeasibleMaxVF(TC);
+    return UserVF ? UserVF : computeFeasibleMaxVF(TC);
   case CM_ScalarEpilogueNotNeededUsePredicate:
----------------
It might be slightly better to have computeFeasibleMaxVF itself have a shortcut to return UserVF. That would potentially avoid missing the accounting for UserVF in new users of computeFeasibleMaxVF


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D80085





More information about the llvm-commits mailing list