[llvm] b17f607 - [SLP][NFC]Remove unnecessary std::optional around Factor value
Alexey Bataev via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 20 05:54:28 PST 2024
Author: Alexey Bataev
Date: 2024-11-20T05:54:15-08:00
New Revision: b17f6077036296cb0f475f16adcdce4af6aea3e9
URL: https://github.com/llvm/llvm-project/commit/b17f6077036296cb0f475f16adcdce4af6aea3e9
DIFF: https://github.com/llvm/llvm-project/commit/b17f6077036296cb0f475f16adcdce4af6aea3e9.diff
LOG: [SLP][NFC]Remove unnecessary std::optional around Factor value
Added:
Modified:
llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
index e70627b6afc10d..380b79c4fa377c 100644
--- a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+++ b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
@@ -10296,10 +10296,10 @@ class BoUpSLP::ShuffleCostEstimator : public BaseShuffleAnalysis {
Idx = EMask[Idx];
}
CommonVF = E->Scalars.size();
- } else if (std::optional<unsigned> Factor = E->getInterleaveFactor();
- Factor && E->Scalars.size() != Mask.size() &&
+ } else if (unsigned Factor = E->getInterleaveFactor();
+ Factor > 0 && E->Scalars.size() != Mask.size() &&
ShuffleVectorInst::isDeInterleaveMaskOfFactor(CommonMask,
- *Factor)) {
+ Factor)) {
// Deinterleaved nodes are free.
std::iota(CommonMask.begin(), CommonMask.end(), 0);
}
More information about the llvm-commits
mailing list