Skip to content

Commit 75ad8c5

Browse files
committed
Fix a release mode warning introduced in r360694
llvm-svn: 360696
1 parent 1acec2b commit 75ad8c5

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

llvm/lib/Transforms/Scalar/IndVarSimplify.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -716,8 +716,6 @@ bool IndVarSimplify::rewriteFirstIterationLoopExitValues(Loop *L) {
716716

717717
SmallVector<BasicBlock *, 8> ExitBlocks;
718718
L->getUniqueExitBlocks(ExitBlocks);
719-
auto *LoopHeader = L->getHeader();
720-
assert(LoopHeader && "Invalid loop");
721719

722720
bool MadeAnyChanges = false;
723721
for (auto *ExitBB : ExitBlocks) {
@@ -766,7 +764,7 @@ bool IndVarSimplify::rewriteFirstIterationLoopExitValues(Loop *L) {
766764
assert(LoopPreheader && "Invalid loop");
767765
int PreheaderIdx = ExitVal->getBasicBlockIndex(LoopPreheader);
768766
if (PreheaderIdx != -1) {
769-
assert(ExitVal->getParent() == LoopHeader &&
767+
assert(ExitVal->getParent() == L->getHeader() &&
770768
"ExitVal must be in loop header");
771769
MadeAnyChanges = true;
772770
PN.setIncomingValue(IncomingValIdx,

0 commit comments

Comments
 (0)