Skip to content

Commit 666e230

Browse files
alexey-bataevyuxuanchen1997
authored andcommitted
[LV][NFC]Simplify the structure and improve message of safe distance analysis for scalable vectorization. (#99487)
Summary: Test Plan: Reviewers: Subscribers: Tasks: Tags: Differential Revision: https://phabricator.intern.facebook.com/D60250789
1 parent aa80e9c commit 666e230

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)