[LV] Fix FoldTail under user VF and UF
LV considers an internally computed MaxVF to decide if a constant trip-count is a multiple of any subsequently chosen VF, and conclude that no scalar remainder iterations (tail) will be left for Fold Tail to handle. If an external VF is provided via -force-vector-width, it must be considered instead of the internal MaxVF. If an external UF is provided via -force-vector-interleave, it too must be considered in addition to MaxVF or user VF. Fixes PR45679. Differential Revision: https://reviews.llvm.org/D80085
Showing
- llvm/lib/Transforms/Vectorize/LoopVectorizationPlanner.h 1 addition, 1 deletionllvm/lib/Transforms/Vectorize/LoopVectorizationPlanner.h
- llvm/lib/Transforms/Vectorize/LoopVectorize.cpp 13 additions, 10 deletionsllvm/lib/Transforms/Vectorize/LoopVectorize.cpp
- llvm/test/Transforms/LoopVectorize/pr45679-fold-tail-by-masking.ll 148 additions, 0 deletions.../Transforms/LoopVectorize/pr45679-fold-tail-by-masking.ll
Loading
Please register or sign in to comment