[llvm] 7d815c7 - [LV] Remove unused variables after 965231ca0a9a. (NFC)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 1 02:12:34 PDT 2025
Author: Florian Hahn
Date: 2025-08-01T10:12:20+01:00
New Revision: 7d815c7642ef202741ea27c3aa6a3ffd4113ecf7
URL: https://github.com/llvm/llvm-project/commit/7d815c7642ef202741ea27c3aa6a3ffd4113ecf7
DIFF: https://github.com/llvm/llvm-project/commit/7d815c7642ef202741ea27c3aa6a3ffd4113ecf7.diff
LOG: [LV] Remove unused variables after 965231ca0a9a. (NFC)
Clean up unused/dead variables after 965231ca0a9a
(https://github.com/llvm/llvm-project/pull/151311)
Added:
Modified:
llvm/lib/Transforms/Vectorize/LoopVectorizationLegality.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/Vectorize/LoopVectorizationLegality.cpp b/llvm/lib/Transforms/Vectorize/LoopVectorizationLegality.cpp
index 77e6c4186076c..c47fd9421fddd 100644
--- a/llvm/lib/Transforms/Vectorize/LoopVectorizationLegality.cpp
+++ b/llvm/lib/Transforms/Vectorize/LoopVectorizationLegality.cpp
@@ -1670,8 +1670,7 @@ bool LoopVectorizationLegality::isVectorizableEarlyExitLoop() {
const SCEV *EC =
PSE.getSE()->getPredicatedExitCount(TheLoop, BB, &Predicates);
if (isa<SCEVCouldNotCompute>(EC)) {
- SmallVector<BasicBlock *, 2> Succs(successors(BB));
- if (Succs.size() != 2) {
+ if (size(successors(BB)) != 2) {
reportVectorizationFailure(
"Early exiting block does not have exactly two successors",
"Incorrect number of successors from early exiting block",
@@ -1679,14 +1678,6 @@ bool LoopVectorizationLegality::isVectorizableEarlyExitLoop() {
return false;
}
- BasicBlock *ExitBlock;
- if (!TheLoop->contains(Succs[0]))
- ExitBlock = Succs[0];
- else {
- assert(!TheLoop->contains(Succs[1]));
- ExitBlock = Succs[1];
- }
-
if (SingleUncountableExitingBlock) {
reportVectorizationFailure(
"Loop has too many uncountable exits",
More information about the llvm-commits
mailing list