mirror of
https://github.com/RPCS3/llvm.git
synced 2026-07-21 03:05:26 -04:00
[SLP] reduce duplicated code; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@369250 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -2176,11 +2176,13 @@ void BoUpSLP::buildTree_rec(ArrayRef<Value *> VL, unsigned Depth,
|
||||
if (Res.second)
|
||||
UniqueValues.emplace_back(V);
|
||||
}
|
||||
if (UniqueValues.size() == VL.size()) {
|
||||
size_t NumUniqueScalarValues = UniqueValues.size();
|
||||
if (NumUniqueScalarValues == VL.size()) {
|
||||
ReuseShuffleIndicies.clear();
|
||||
} else {
|
||||
LLVM_DEBUG(dbgs() << "SLP: Shuffle for reused scalars.\n");
|
||||
if (UniqueValues.size() <= 1 || !llvm::isPowerOf2_32(UniqueValues.size())) {
|
||||
if (NumUniqueScalarValues <= 1 ||
|
||||
!llvm::isPowerOf2_32(NumUniqueScalarValues)) {
|
||||
LLVM_DEBUG(dbgs() << "SLP: Scalar used twice in bundle.\n");
|
||||
newTreeEntry(VL, None /*not vectorized*/, UserTreeIdx);
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user