mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-15 21:24:00 +00:00
Use ReplaceInstUsesWith instead of replaceAllUsesWith where appropriate in instcombine.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131512 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -133,7 +133,7 @@ Instruction *InstCombiner::PromoteCastOfAllocation(BitCastInst &CI,
|
||||
// New is the allocation instruction, pointer typed. AI is the original
|
||||
// allocation instruction, also pointer typed. Thus, cast to use is BitCast.
|
||||
Value *NewCast = AllocaBuilder.CreateBitCast(New, AI.getType(), "tmpcast");
|
||||
AI.replaceAllUsesWith(NewCast);
|
||||
ReplaceInstUsesWith(AI, NewCast);
|
||||
}
|
||||
return ReplaceInstUsesWith(CI, New);
|
||||
}
|
||||
@ -1228,7 +1228,7 @@ Instruction *InstCombiner::visitFPTrunc(FPTruncInst &CI) {
|
||||
|
||||
|
||||
// Remove the old Call. With -fmath-errno, it won't get marked readnone.
|
||||
Call->replaceAllUsesWith(UndefValue::get(Call->getType()));
|
||||
ReplaceInstUsesWith(*Call, UndefValue::get(Call->getType()));
|
||||
EraseInstFromFunction(*Call);
|
||||
return ret;
|
||||
}
|
||||
|
Reference in New Issue
Block a user