[llvm] [LV] Prevent query the computeCost() when VF=1 in emitInvalidCostRemarks(). (PR #117288)
Elvis Wang via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 12 15:37:08 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())
----------------
ElvisWang123 wrote:
Updated comments.
Currently, we cannot query the vplan-based cost model with scalar VF because we use lots of `cast<VectorType>(toVectorTy(SrcTy, VF))` in `computeCost()`.
https://github.com/llvm/llvm-project/pull/117288
More information about the llvm-commits
mailing list