[llvm] [VPlan] Only use selectVectorizationFactor for cross-check (NFCI). (PR #103033)

via llvm-commits llvm-commits at lists.llvm.org
Sun Aug 18 03:48:56 PDT 2024


================
@@ -7262,7 +7246,19 @@ ElementCount LoopVectorizationPlanner::getBestVF() {
         ProfitableVFs.push_back(CurrentFactor);
     }
   }
-  return BestFactor.Width;
+
+#ifndef NDEBUG
+  // Select the optimal vectorization factor according to the legacy cost-model.
+  // This is now only used to verify the decisions by the new VPlan-based
+  // cost-model and will be retired once the VPlan-based cost-model is
+  // stabilized.
+  VectorizationFactor LegacyVF = selectVectorizationFactor();
+  assert(BestFactor.Width == LegacyVF.Width);
----------------
ayalz wrote:

Error message missing.

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


More information about the llvm-commits mailing list