[llvm] [LV] Update forced epilogue VF options to allow different VFs than main. (PR #190393)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 8 10:02:47 PDT 2026
================
@@ -7181,7 +7196,19 @@ LoopVectorizationPlanner::computeBestVF() {
// If there is a single VPlan with a single VF, return it directly.
VPlan &FirstPlan = *VPlans[0];
if (VPlans.size() == 1 && size(FirstPlan.vectorFactors()) == 1)
- return {{*FirstPlan.vectorFactors().begin(), 0, 0}, &FirstPlan};
+ return {VectorizationFactor(*FirstPlan.vectorFactors().begin(), 0, 0),
+ &FirstPlan};
+
+ ElementCount UserVF = Hints.getWidth();
+ if (EpilogueVectorizationForceVF > 1 && UserVF && hasPlanWithVF(UserVF)) {
+ [[maybe_unused]] ElementCount EpilogueVF =
+ ElementCount::getFixed(EpilogueVectorizationForceVF);
+ assert(*VPlans[0]->vectorFactors().begin() == EpilogueVF &&
----------------
ayalz wrote:
Should be useful to have `getSingleVF()`.
https://github.com/llvm/llvm-project/pull/190393
More information about the llvm-commits
mailing list