[llvm] 2838864 - [NFC] Simple tidy-up in LoopVectorizationCostModel::selectEpilogueVectorizationFactor
David Sherwood via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 4 02:17:39 PDT 2021
Author: David Sherwood
Date: 2021-10-04T10:14:22+01:00
New Revision: 28388645a39e4e840a7f3e72e851b1a68fc5deca
URL: https://github.com/llvm/llvm-project/commit/28388645a39e4e840a7f3e72e851b1a68fc5deca
DIFF: https://github.com/llvm/llvm-project/commit/28388645a39e4e840a7f3e72e851b1a68fc5deca.diff
LOG: [NFC] Simple tidy-up in LoopVectorizationCostModel::selectEpilogueVectorizationFactor
Avoid creating EpilogueVectorizationForceVF twice.
Added:
Modified:
llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
index 6f1713477acf1..8a2f495601987 100644
--- a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+++ b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
@@ -6249,9 +6249,9 @@ LoopVectorizationCostModel::selectEpilogueVectorizationFactor(
if (EpilogueVectorizationForceVF > 1) {
LLVM_DEBUG(dbgs() << "LEV: Epilogue vectorization factor is forced.\n";);
- if (LVP.hasPlanWithVFs(
- {MainLoopVF, ElementCount::getFixed(EpilogueVectorizationForceVF)}))
- return {ElementCount::getFixed(EpilogueVectorizationForceVF), 0};
+ ElementCount ForcedEC = ElementCount::getFixed(EpilogueVectorizationForceVF);
+ if (LVP.hasPlanWithVFs({MainLoopVF, ForcedEC}))
+ return {ForcedEC, 0};
else {
LLVM_DEBUG(
dbgs()
More information about the llvm-commits
mailing list