[llvm] [LV] Prevent query the computeCost() when VF=1 in emitInvalidCostRemarks(). (PR #117288)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 12 15:15:50 PST 2024


================
@@ -4372,6 +4372,9 @@ void LoopVectorizationPlanner::emitInvalidCostRemarks(
   SmallVector<RecipeVFPair> InvalidCosts;
   for (const auto &Plan : VPlans) {
     for (ElementCount VF : Plan->vectorFactors()) {
+      if (VF.isScalar())
----------------
fhahn wrote:

Could you add a comment here why we skip scalar VFs? Presumably because we don’t expect them to have invalid costs?

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


More information about the llvm-commits mailing list