[llvm] c5a9049 - [LV][NFC] remove dead code in canFoldTailByMasking() (#190263)
via llvm-commits
llvm-commits at lists.llvm.org
Sun Apr 5 04:59:36 PDT 2026
Author: Hassnaa Hamdi
Date: 2026-04-05T12:59:32+01:00
New Revision: c5a904946a1d5f6eda5eb1f0ceb440135700faa6
URL: https://github.com/llvm/llvm-project/commit/c5a904946a1d5f6eda5eb1f0ceb440135700faa6
DIFF: https://github.com/llvm/llvm-project/commit/c5a904946a1d5f6eda5eb1f0ceb440135700faa6.diff
LOG: [LV][NFC] remove dead code in canFoldTailByMasking() (#190263)
Remove unused ReductionLiveOuts variable in `canFoldTailByMasking()`.
The set was being populated with reduction loop exit instructions but
was never actually used anywhere in the function.
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 6e4ecbdecb7cf..07e6780d9e7ba 100644
--- a/llvm/lib/Transforms/Vectorize/LoopVectorizationLegality.cpp
+++ b/llvm/lib/Transforms/Vectorize/LoopVectorizationLegality.cpp
@@ -2071,11 +2071,6 @@ bool LoopVectorizationLegality::canFoldTailByMasking() const {
LLVM_DEBUG(dbgs() << "LV: checking if tail can be folded by masking.\n");
- SmallPtrSet<const Value *, 8> ReductionLiveOuts;
-
- for (const auto &Reduction : getReductionVars())
- ReductionLiveOuts.insert(Reduction.second.getLoopExitInstr());
-
// The list of pointers that we can safely read and write to remains empty.
SmallPtrSet<Value *, 8> SafePointers;
More information about the llvm-commits
mailing list