aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Transforms/Scalar/LoopIdiomRecognize.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2011-02-21 17:02:55 +0000
committerChris Lattner <sabre@nondot.org>2011-02-21 17:02:55 +0000
commit0e68cee62f251c45df92c71ca536142bc7d82631 (patch)
tree91b3b0d16536d71bc403f5b6335c7e8e783b3068 /lib/Transforms/Scalar/LoopIdiomRecognize.cpp
parentb4098ba03d51a3845bde5aeb4fca893d1a90d3f8 (diff)
downloadexternal_llvm-0e68cee62f251c45df92c71ca536142bc7d82631.zip
external_llvm-0e68cee62f251c45df92c71ca536142bc7d82631.tar.gz
external_llvm-0e68cee62f251c45df92c71ca536142bc7d82631.tar.bz2
fix a crasher in disabled code (on variable stride loops)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126125 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Scalar/LoopIdiomRecognize.cpp')
-rw-r--r--lib/Transforms/Scalar/LoopIdiomRecognize.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Transforms/Scalar/LoopIdiomRecognize.cpp b/lib/Transforms/Scalar/LoopIdiomRecognize.cpp
index 568a143..f8ce214 100644
--- a/lib/Transforms/Scalar/LoopIdiomRecognize.cpp
+++ b/lib/Transforms/Scalar/LoopIdiomRecognize.cpp
@@ -281,7 +281,7 @@ bool LoopIdiomRecognize::processLoopStore(StoreInst *SI, const SCEV *BECount) {
// TODO: Could also handle negative stride here someday, that will require
// the validity check in mayLoopAccessLocation to be updated though.
// Enable this to print exact negative strides.
- if (0 && StoreSize == -Stride->getValue()->getValue()) {
+ if (0 && Stride && StoreSize == -Stride->getValue()->getValue()) {
dbgs() << "NEGATIVE STRIDE: " << *SI << "\n";
dbgs() << "BB: " << *SI->getParent();
}