[llvm] 552e27c - [SLP] Use allConstant helper. NFCI.
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Sun Feb 5 11:22:17 PST 2023
Author: Simon Pilgrim
Date: 2023-02-05T19:21:48Z
New Revision: 552e27c5217cc41c857e47d47b1d9d1253c6cefd
URL: https://github.com/llvm/llvm-project/commit/552e27c5217cc41c857e47d47b1d9d1253c6cefd
DIFF: https://github.com/llvm/llvm-project/commit/552e27c5217cc41c857e47d47b1d9d1253c6cefd.diff
LOG: [SLP] Use allConstant helper. NFCI.
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 7719a13a99266..e10954681b956 100644
--- a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+++ b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
@@ -4384,7 +4384,7 @@ bool BoUpSLP::canReorderOperands(
}
return false;
}) > 1 &&
- !all_of(UserTE->getOperand(I), isConstant))
+ !allConstant(UserTE->getOperand(I)))
return false;
if (Gather)
GatherOps.push_back(Gather);
@@ -12900,7 +12900,7 @@ class HorizontalReduction {
InstructionCost VectorCost = 0, ScalarCost;
// If all of the reduced values are constant, the vector cost is 0, since
// the reduction value can be calculated at the compile time.
- bool AllConsts = all_of(ReducedVals, isConstant);
+ bool AllConsts = allConstant(ReducedVals);
switch (RdxKind) {
case RecurKind::Add:
case RecurKind::Mul:
More information about the llvm-commits
mailing list