Skip to content

Commit db8a41c

Browse files
committed
fixup! [LV] Vectorize Epilogues for loops with small VF but high IC
1 parent adac0aa commit db8a41c

File tree

3 files changed

+103
-117
lines changed

3 files changed

+103
-117
lines changed

llvm/lib/Transforms/Vectorize/LoopVectorizationPlanner.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -471,6 +471,8 @@ class LoopVectorizationPlanner {
471471
bool isMoreProfitable(const VectorizationFactor &A,
472472
const VectorizationFactor &B) const;
473473

474+
/// Returns true if the per-lane cost of VectorizationFactor A is lower than
475+
/// that of B in the context of vectorizing a loop with known \p MaxTripCount.
474476
bool isMoreProfitable(const VectorizationFactor &A,
475477
const VectorizationFactor &B,
476478
const unsigned MaxTripCount) const;

llvm/lib/Transforms/Vectorize/LoopVectorize.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1537,6 +1537,8 @@ class LoopVectorizationCostModel {
15371537
/// Returns true if epilogue vectorization is considered profitable, and
15381538
/// false otherwise.
15391539
/// \p VF is the vectorization factor chosen for the original loop.
1540+
/// \p Multiplier is an aditional scaling factor applied to VF before
1541+
/// comparing to EpilogueVectorizationMinVF.
15401542
bool isEpilogueVectorizationProfitable(const ElementCount VF,
15411543
const unsigned Multiplier) const;
15421544

0 commit comments

Comments
 (0)