[llvm] LV]: consider scalable VF during deciding dead epilogue. (PR #156724)
David Sherwood via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 4 05:10:41 PST 2025
================
@@ -4407,6 +4407,13 @@ VectorizationFactor LoopVectorizationPlanner::selectEpilogueVectorizationFactor(
LLVM_DEBUG(dbgs() << "LEV: Maximum Trip Count for Epilogue: "
<< MaxTripCount << "\n");
}
+ // Check if the RemainingIterations is scalable.
----------------
david-arm wrote:
Do we actually need this code? Unless I've missed something the only way `RemainingIterations` can be scalable is if both `ScalableTC==true` and `MainLoopVF.isScalable()==true`. Can't you just write
```
bool ScalableRemIter = ScalableTC && MainLoopVF.isScalable();
```
For all other calculations we are either operating on fixed-width only or we have used estimates for scalable versions.
https://github.com/llvm/llvm-project/pull/156724
More information about the llvm-commits
mailing list