Skip to content

Commit 1a80153

Browse files
[LV][NFC]Simplify the structure and improve message of safe distance analysis for scalable vectorization. (#99487)
1 parent 50b657c commit 1a80153

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

llvm/lib/Transforms/Vectorize/LoopVectorize.cpp

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4197,14 +4197,11 @@ bool LoopVectorizationCostModel::isScalableVectorizationAllowed() {
41974197
return false;
41984198
}
41994199

4200-
if (!Legal->isSafeForAnyVectorWidth()) {
4201-
std::optional<unsigned> MaxVScale = getMaxVScale(*TheFunction, TTI);
4202-
if (!MaxVScale) {
4203-
reportVectorizationInfo(
4204-
"The target does not provide maximum vscale value.",
4205-
"ScalableVFUnfeasible", ORE, TheLoop);
4206-
return false;
4207-
}
4200+
if (!Legal->isSafeForAnyVectorWidth() && !getMaxVScale(*TheFunction, TTI)) {
4201+
reportVectorizationInfo("The target does not provide maximum vscale value "
4202+
"for safe distance analysis.",
4203+
"ScalableVFUnfeasible", ORE, TheLoop);
4204+
return false;
42084205
}
42094206

42104207
IsScalableVectorizationAllowed = true;

0 commit comments

Comments
 (0)