[llvm] 1a80153 - [LV][NFC]Simplify the structure and improve message of safe distance analysis for scalable vectorization. (#99487)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 18 07:11:41 PDT 2024
Author: Alexey Bataev
Date: 2024-07-18T10:11:39-04:00
New Revision: 1a80153ba91f1e623c042fa0ae1ee5ab67087c0e
URL: https://github.com/llvm/llvm-project/commit/1a80153ba91f1e623c042fa0ae1ee5ab67087c0e
DIFF: https://github.com/llvm/llvm-project/commit/1a80153ba91f1e623c042fa0ae1ee5ab67087c0e.diff
LOG: [LV][NFC]Simplify the structure and improve message of safe distance analysis for scalable vectorization. (#99487)
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 40919c944d21f..7ca798a8b2d89 100644
--- a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+++ b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
@@ -4197,14 +4197,11 @@ bool LoopVectorizationCostModel::isScalableVectorizationAllowed() {
return false;
}
- if (!Legal->isSafeForAnyVectorWidth()) {
- std::optional<unsigned> MaxVScale = getMaxVScale(*TheFunction, TTI);
- if (!MaxVScale) {
- reportVectorizationInfo(
- "The target does not provide maximum vscale value.",
- "ScalableVFUnfeasible", ORE, TheLoop);
- return false;
- }
+ if (!Legal->isSafeForAnyVectorWidth() && !getMaxVScale(*TheFunction, TTI)) {
+ reportVectorizationInfo("The target does not provide maximum vscale value "
+ "for safe distance analysis.",
+ "ScalableVFUnfeasible", ORE, TheLoop);
+ return false;
}
IsScalableVectorizationAllowed = true;
More information about the llvm-commits
mailing list