We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6bd6461 commit 9ef8f20Copy full SHA for 9ef8f20
llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
@@ -4215,9 +4215,9 @@ ElementCount LoopVectorizationCostModel::getMaximizedVFForTarget(
4215
4216
// Set the max VF to the largest viable vectorization factor less than or
4217
// equal to the max vector element count.
4218
- for (ElementCount VS = MaxVectorElementCount * 2;
4219
- ElementCount::isKnownLE(VS, MaxVectorElementCountMaxBW); VS *= 2)
4220
- MaxVF = VS;
+ if (ElementCount::isKnownLE(MaxVectorElementCount,
+ MaxVectorElementCountMaxBW))
+ MaxVF = MaxVectorElementCountMaxBW;
4221
4222
if (ElementCount MinVF =
4223
TTI.getMinimumVF(SmallestType, ComputeScalableMaxVF)) {
0 commit comments