mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-27 14:24:40 +00:00
Final step of instcombine debuginfo; switch a couple more places over to InsertNewInstWith, and use setDebugLoc for the cases which can't be easily handled by the automated mechanisms.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132167 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -602,10 +602,12 @@ bool InstCombiner::SimplifyStoreAtEndOfBlock(StoreInst &SI) {
|
||||
// Advance to a place where it is safe to insert the new store and
|
||||
// insert it.
|
||||
BBI = DestBB->getFirstNonPHI();
|
||||
InsertNewInstBefore(new StoreInst(MergedVal, SI.getOperand(1),
|
||||
OtherStore->isVolatile(),
|
||||
SI.getAlignment()), *BBI);
|
||||
|
||||
StoreInst *NewSI = new StoreInst(MergedVal, SI.getOperand(1),
|
||||
OtherStore->isVolatile(),
|
||||
SI.getAlignment());
|
||||
InsertNewInstBefore(NewSI, *BBI);
|
||||
NewSI->setDebugLoc(OtherStore->getDebugLoc());
|
||||
|
||||
// Nuke the old stores.
|
||||
EraseInstFromFunction(SI);
|
||||
EraseInstFromFunction(*OtherStore);
|
||||
|
Reference in New Issue
Block a user