[llvm] [LV]Set tailfolding styles before computing feasible max VF. (PR #91403)
via llvm-commits
llvm-commits at lists.llvm.org
Sat Jul 13 15:02:57 PDT 2024
================
@@ -4229,9 +4248,20 @@ LoopVectorizationCostModel::getMaxLegalScalableVF(unsigned MaxSafeElements) {
reportVectorizationInfo("Scalable vectorization is not supported "
"for all element types found in this loop.",
"ScalableVFUnfeasible", ORE, TheLoop);
- return ElementCount::getScalable(0);
+ return false;
}
+ IsScalableVectorizationAllowed = true;
+ return true;
+}
+
+ElementCount
+LoopVectorizationCostModel::getMaxLegalScalableVF(unsigned MaxSafeElements) {
+ if (!isScalableVectorizationAllowed())
+ return ElementCount::getScalable(0);
+
+ auto MaxScalableVF = ElementCount::getScalable(
+ std::numeric_limits<ElementCount::ScalarTy>::max());
----------------
ayalz wrote:
independent of this patch - this potentially overrides `MaxSafeElements` - worth some assert?
The report below refers to getScalable(MaxSafeElements / *MaxVScale) returning false, rather than getMaxVScale() returning false?
https://github.com/llvm/llvm-project/pull/91403
More information about the llvm-commits
mailing list