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 | e1713e5fcffa616ceb0331de2eb708a807c063d0 (patch) | |
| tree | fc54be845b7bdc0b0bf477a0d5e96e2d11c29b09 | |
| parent | a02291010d44c85309a5bee231cbd82d8120fdda (diff) | |
| download | bcm5719-llvm-e1713e5fcffa616ceb0331de2eb708a807c063d0.tar.gz bcm5719-llvm-e1713e5fcffa616ceb0331de2eb708a807c063d0.zip  | |
SLP Vectorizer: do not search for store-chains that are wider than the vector-register size.
llvm-svn: 184527
| -rw-r--r-- | llvm/lib/Transforms/Vectorize/VecUtils.cpp | 6 | 
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Vectorize/VecUtils.cpp b/llvm/lib/Transforms/Vectorize/VecUtils.cpp index 16189860420..3db4adf95c8 100644 --- a/llvm/lib/Transforms/Vectorize/VecUtils.cpp +++ b/llvm/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  | 

