Skip to content

Commit 0cee1bf

Browse files
committed
[SLP] remove redundant size check; NFC
We bail out on small array size anyway.
1 parent bbad998 commit 0cee1bf

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6796,14 +6796,10 @@ class HorizontalReduction {
67966796
return true;
67976797
}
67986798

6799-
/// Attempt to vectorize the tree found by
6800-
/// matchAssociativeReduction.
6799+
/// Attempt to vectorize the tree found by matchAssociativeReduction.
68016800
bool tryToReduce(BoUpSLP &V, TargetTransformInfo *TTI) {
6802-
if (ReducedVals.empty())
6803-
return false;
6804-
6805-
// If there is a sufficient number of reduction values, reduce
6806-
// to a nearby power-of-2. Can safely generate oversized
6801+
// If there are a sufficient number of reduction values, reduce
6802+
// to a nearby power-of-2. We can safely generate oversized
68076803
// vectors and rely on the backend to split them to legal sizes.
68086804
unsigned NumReducedVals = ReducedVals.size();
68096805
if (NumReducedVals < 4)

0 commit comments

Comments
 (0)