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

via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 20 09:02:25 PDT 2024


================
@@ -7031,11 +7030,10 @@ LoopVectorizationPlanner::plan(ElementCount UserVF, unsigned UserIC) {
         if (!hasPlanWithVF(UserVF)) {
           LLVM_DEBUG(dbgs()
                      << "LV: No VPlan could be built for " << UserVF << ".\n");
-          return std::nullopt;
         }
 
         LLVM_DEBUG(printPlans(dbgs()));
----------------
ayalz wrote:

```suggestion
        LLVM_DEBUG(printPlans(dbgs()));
```
suggest to remove the
```
        if (!hasPlanWithVF(UserVF)) {
          LLVM_DEBUG(dbgs()
                     << "LV: No VPlan could be built for " << UserVF << ".\n");
        }
```
part - the debug message saying "No VPlan could be built for" UserVF can be folded into `printPlans()` which now informs that "No VPlans were built" when is has no plans to print. This comes after saying "LV: Using user VF" UserVF, so if no plans were built it's clear that none could be built for UserVF.

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


More information about the llvm-commits mailing list