[llvm] [LV] Factor out VF-independent code from cost model (NFC). (PR #192426)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 22 07:16:40 PDT 2026


================
@@ -3489,9 +3034,16 @@ LoopVectorizationCostModel::computeMaxVF(ElementCount UserVF, unsigned UserIC) {
     return FixedScalableVFPair::getNone();
   }
 
+  assert(WideningDecisions.empty() && CallWideningDecisions.empty() &&
+         Uniforms.empty() && Scalars.empty() &&
+         "No cost-modeling decisions should have been taken at this point");
+
+  MinBWs = computeMinimumValueSizes(TheLoop->getBlocks(), *DB, &TTI);
----------------
fhahn wrote:

Yep moving here seemed overall the simplest solution

https://github.com/llvm/llvm-project/pull/192426


More information about the llvm-commits mailing list