mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-13 22:24:07 +00:00
SLP Vectorier: Don't vectorize really short chains because they are already handled by the SelectionDAG store-vectorizer, which does a better job in deciding when to vectorize.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187267 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -898,8 +898,12 @@ int BoUpSLP::getTreeCost() {
|
||||
DEBUG(dbgs() << "SLP: Calculating cost for tree of size " <<
|
||||
VectorizableTree.size() << ".\n");
|
||||
|
||||
if (!VectorizableTree.size()) {
|
||||
assert(!ExternalUses.size() && "We should not have any external users");
|
||||
// Don't vectorize tiny trees. Small load/store chains or consecutive stores
|
||||
// of constants will be vectoried in SelectionDAG in MergeConsecutiveStores.
|
||||
if (VectorizableTree.size() < 3) {
|
||||
if (!VectorizableTree.size()) {
|
||||
assert(!ExternalUses.size() && "We should not have any external users");
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user