diff options
author | Nadav Rotem <nrotem@apple.com> | 2013-06-21 04:18:13 +0000 |
---|---|---|
committer | Nadav Rotem <nrotem@apple.com> | 2013-06-21 04:18:13 +0000 |
commit | de26195f3c09f7815161037b3227c34c6cc0afdb (patch) | |
tree | 9b46dd33d6c0d51aed509186f7cda81f85b6c227 /lib | |
parent | d3d03fe758d4ee93ea225c6740742eb56b6dca3b (diff) | |
download | llvm-de26195f3c09f7815161037b3227c34c6cc0afdb.tar.gz llvm-de26195f3c09f7815161037b3227c34c6cc0afdb.tar.bz2 llvm-de26195f3c09f7815161037b3227c34c6cc0afdb.tar.xz |
SLP Vectorizer: do not search for store-chains that are wider than the vector-register size.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184527 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Transforms/Vectorize/VecUtils.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/Transforms/Vectorize/VecUtils.cpp b/lib/Transforms/Vectorize/VecUtils.cpp index 1618986042..3db4adf95c 100644 --- a/lib/Transforms/Vectorize/VecUtils.cpp +++ b/lib/Transforms/Vectorize/VecUtils.cpp @@ -141,9 +141,11 @@ bool BoUpSLP::vectorizeStoreChain(ArrayRef<Value *> Chain, int CostThreshold) { } } - if (Changed) - return true; + 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. int Cost = getTreeCost(Chain); if (Cost < CostThreshold) { DEBUG(dbgs() << "SLP: Found store chain cost = " << Cost |