mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-17 20:23:59 +00:00
SCEVExpander: Fix a regression I introduced by to eagerly adding RAII objects.
PR17425. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191741 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -569,7 +569,7 @@ Value *SCEVExpander::expandAddToGEP(const SCEV *const *op_begin,
|
||||
}
|
||||
|
||||
// Save the original insertion point so we can restore it when we're done.
|
||||
BuilderType::InsertPointGuard Guard(Builder);
|
||||
BuilderType::InsertPoint SaveInsertPt = Builder.saveIP();
|
||||
|
||||
// Move the insertion point out of as many loops as we can.
|
||||
while (const Loop *L = SE.LI->getLoopFor(Builder.GetInsertBlock())) {
|
||||
@ -604,6 +604,9 @@ Value *SCEVExpander::expandAddToGEP(const SCEV *const *op_begin,
|
||||
Ops.push_back(SE.getUnknown(GEP));
|
||||
rememberInstruction(GEP);
|
||||
|
||||
// Restore the original insert point.
|
||||
Builder.restoreIP(SaveInsertPt);
|
||||
|
||||
return expand(SE.getAddExpr(Ops));
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user