mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-14 16:33:28 +00:00
Not all custom inserters create new basic blocks. If the inserter
didn't create a new block, don't reset the insert position. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107813 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
26b8ef53ff
commit
5c480432b5
@ -732,8 +732,11 @@ EmitMachineNode(SDNode *Node, bool IsClone, bool IsCloned,
|
||||
if (II.usesCustomInsertionHook()) {
|
||||
// Insert this instruction into the basic block using a target
|
||||
// specific inserter which may returns a new basic block.
|
||||
MBB = TLI->EmitInstrWithCustomInserter(MI, MBB);
|
||||
InsertPos = MBB->end();
|
||||
MachineBasicBlock *NewMBB = TLI->EmitInstrWithCustomInserter(MI, MBB);
|
||||
if (NewMBB != MBB) {
|
||||
MBB = NewMBB;
|
||||
InsertPos = NewMBB->end();
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user