mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 20:32:21 +00:00
Insert code in the right location when lowering PowerPC atomics.
This causes defs to dominate uses, no instructions after terminators, and other goodness. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128836 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
866bdadd83
commit
5fcb81dace
@ -4687,7 +4687,8 @@ PPCTargetLowering::EmitPartwordAtomicBinary(MachineInstr *MI,
|
||||
// exitMBB:
|
||||
// ...
|
||||
BB = exitMBB;
|
||||
BuildMI(BB, dl, TII->get(PPC::SRW), dest).addReg(TmpDestReg).addReg(ShiftReg);
|
||||
BuildMI(*BB, BB->begin(), dl, TII->get(PPC::SRW), dest).addReg(TmpDestReg)
|
||||
.addReg(ShiftReg);
|
||||
return BB;
|
||||
}
|
||||
|
||||
@ -5036,7 +5037,8 @@ PPCTargetLowering::EmitInstrWithCustomInserter(MachineInstr *MI,
|
||||
// exitMBB:
|
||||
// ...
|
||||
BB = exitMBB;
|
||||
BuildMI(BB, dl, TII->get(PPC::SRW),dest).addReg(TmpReg).addReg(ShiftReg);
|
||||
BuildMI(*BB, BB->begin(), dl, TII->get(PPC::SRW),dest).addReg(TmpReg)
|
||||
.addReg(ShiftReg);
|
||||
} else {
|
||||
llvm_unreachable("Unexpected instr type to insert");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user