diff --git a/llvm/lib/Transforms/Scalar/LoopIdiomRecognize.cpp b/llvm/lib/Transforms/Scalar/LoopIdiomRecognize.cpp index de0dc3cc0a13..f933e82d928a 100644 --- a/llvm/lib/Transforms/Scalar/LoopIdiomRecognize.cpp +++ b/llvm/lib/Transforms/Scalar/LoopIdiomRecognize.cpp @@ -552,6 +552,7 @@ bool LoopIdiomRecognize::processLoopStridedStore( Type *IntPtr = Builder.getIntPtrTy(*DL, DestAS); const SCEV *Start = Ev->getStart(); + // Handle negative strided loops. if (NegStride) Start = getStartForNegStride(Start, BECount, IntPtr, StoreSize, SE);