mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-23 00:20:25 +00:00
When inserting new instructions, use getFirstInsertionPt instead of
getFirstNonPHI so that it will skip over the landingpad instructions as well. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138537 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1145,7 +1145,7 @@ bool InstCombiner::transformConstExprCastCall(CallSite CS) {
|
||||
// If this is an invoke instruction, we should insert it after the first
|
||||
// non-phi, instruction in the normal successor block.
|
||||
if (InvokeInst *II = dyn_cast<InvokeInst>(Caller)) {
|
||||
BasicBlock::iterator I = II->getNormalDest()->getFirstNonPHI();
|
||||
BasicBlock::iterator I = II->getNormalDest()->getFirstInsertionPt();
|
||||
InsertNewInstBefore(NC, *I);
|
||||
} else {
|
||||
// Otherwise, it's a call, just insert cast right after the call.
|
||||
|
||||
Reference in New Issue
Block a user