diff --git a/llvm/lib/Transforms/Scalar/LoopRotation.cpp b/llvm/lib/Transforms/Scalar/LoopRotation.cpp index eebc69c53ff9..783056d0790e 100644 --- a/llvm/lib/Transforms/Scalar/LoopRotation.cpp +++ b/llvm/lib/Transforms/Scalar/LoopRotation.cpp @@ -366,7 +366,7 @@ void LoopRotate::updateExitBlock() { // There is already one incoming value from original pre-header block. if (PN->getBasicBlockIndex(OrigPreHeader) != -1) - return; + continue; const RenameData *ILoopHeaderInfo; Value *V = PN->getIncomingValueForBlock(OrigHeader);