summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis
diff options
context:
space:
mode:
authorKyle Butt <kyle+llvm@iteratee.net>2016-01-08 01:55:13 +0000
committerKyle Butt <kyle+llvm@iteratee.net>2016-01-08 01:55:13 +0000
commita02ce98bd4d406b0aa3b440dfcacfbd23a8b95fa (patch)
treebfd38fb3c9ee8197ac271bdc70b971031acff97c /llvm/lib/Analysis
parentd72a458d28b180b7d1c224df2e00653975ac4359 (diff)
downloadbcm5719-llvm-a02ce98bd4d406b0aa3b440dfcacfbd23a8b95fa.tar.gz
bcm5719-llvm-a02ce98bd4d406b0aa3b440dfcacfbd23a8b95fa.zip
[Vectorization] Actually return from error case in isStridedPtr
The early return seems to be missed. This causes a radical and wrong loop optimization on powerpc. It isn't reproducible on x86_64, because "UseInterleaved" is false. Patch by Tim Shen. llvm-svn: 257134
Diffstat (limited to 'llvm/lib/Analysis')
-rw-r--r--llvm/lib/Analysis/LoopAccessAnalysis.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/Analysis/LoopAccessAnalysis.cpp b/llvm/lib/Analysis/LoopAccessAnalysis.cpp
index d7896ade354..8bcdcb86201 100644
--- a/llvm/lib/Analysis/LoopAccessAnalysis.cpp
+++ b/llvm/lib/Analysis/LoopAccessAnalysis.cpp
@@ -845,6 +845,7 @@ int llvm::isStridedPtr(PredicatedScalarEvolution &PSE, Value *Ptr,
if (Lp != AR->getLoop()) {
DEBUG(dbgs() << "LAA: Bad stride - Not striding over innermost loop " <<
*Ptr << " SCEV: " << *PtrScev << "\n");
+ return 0;
}
// The address calculation must not wrap. Otherwise, a dependence could be
OpenPOWER on IntegriCloud