SLP Vectorizer: Disable the vectorization of non power of two chains, such as <3 x float>, because we dont have a good cost model for these types.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187265 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Nadav Rotem
2013-07-26 22:53:11 +00:00
parent c1bb2d4325
commit a629c3a4f0
3 changed files with 39 additions and 49 deletions
@@ -1664,23 +1664,7 @@ bool SLPVectorizer::vectorizeStoreChain(ArrayRef<Value *> Chain,
}
}
if (Changed || ChainLen > VF)
return Changed;
// Handle short chains. This helps us catch types such as <3 x float> that
// are smaller than vector size.
R.buildTree(Chain);
int Cost = R.getTreeCost();
if (Cost < CostThreshold) {
DEBUG(dbgs() << "SLP: Found store chain cost = " << Cost
<< " for size = " << ChainLen << "\n");
R.vectorizeTree();
return true;
}
return false;
}
bool SLPVectorizer::vectorizeStores(ArrayRef<StoreInst *> Stores,