[llvm-commits] [llvm] r126125 - /llvm/trunk/lib/Transforms/Scalar/LoopIdiomRecognize.cpp

Chris Lattner sabre at nondot.org
Mon Feb 21 09:02:55 PST 2011


Author: lattner
Date: Mon Feb 21 11:02:55 2011
New Revision: 126125

URL: http://llvm.org/viewvc/llvm-project?rev=126125&view=rev
Log:
fix a crasher in disabled code (on variable stride loops)

Modified:
    llvm/trunk/lib/Transforms/Scalar/LoopIdiomRecognize.cpp

Modified: llvm/trunk/lib/Transforms/Scalar/LoopIdiomRecognize.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/LoopIdiomRecognize.cpp?rev=126125&r1=126124&r2=126125&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/LoopIdiomRecognize.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/LoopIdiomRecognize.cpp Mon Feb 21 11:02:55 2011
@@ -281,7 +281,7 @@
     // 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();
     }





More information about the llvm-commits mailing list