File tree Expand file tree Collapse file tree 1 file changed +1
-3
lines changed
llvm/lib/Transforms/Scalar Expand file tree Collapse file tree 1 file changed +1
-3
lines changed Original file line number Diff line number Diff line change @@ -716,8 +716,6 @@ bool IndVarSimplify::rewriteFirstIterationLoopExitValues(Loop *L) {
716
716
717
717
SmallVector<BasicBlock *, 8 > ExitBlocks;
718
718
L->getUniqueExitBlocks (ExitBlocks);
719
- auto *LoopHeader = L->getHeader ();
720
- assert (LoopHeader && " Invalid loop" );
721
719
722
720
bool MadeAnyChanges = false ;
723
721
for (auto *ExitBB : ExitBlocks) {
@@ -766,7 +764,7 @@ bool IndVarSimplify::rewriteFirstIterationLoopExitValues(Loop *L) {
766
764
assert (LoopPreheader && " Invalid loop" );
767
765
int PreheaderIdx = ExitVal->getBasicBlockIndex (LoopPreheader);
768
766
if (PreheaderIdx != -1 ) {
769
- assert (ExitVal->getParent () == LoopHeader &&
767
+ assert (ExitVal->getParent () == L-> getHeader () &&
770
768
" ExitVal must be in loop header" );
771
769
MadeAnyChanges = true ;
772
770
PN.setIncomingValue (IncomingValIdx,
You can’t perform that action at this time.
0 commit comments