diff options
author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2011-04-04 17:57:29 +0000 |
---|---|---|
committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2011-04-04 17:57:29 +0000 |
commit | 5fcb81dace175106024941b09fa27aecba2d7db7 (patch) | |
tree | 856f6540045711508686325c6eb40fa7d8a3f79d | |
parent | 866bdadd83357e6d8811f5ff295adc00513591c7 (diff) | |
download | external_llvm-5fcb81dace175106024941b09fa27aecba2d7db7.zip external_llvm-5fcb81dace175106024941b09fa27aecba2d7db7.tar.gz external_llvm-5fcb81dace175106024941b09fa27aecba2d7db7.tar.bz2 |
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
-rw-r--r-- | lib/Target/PowerPC/PPCISelLowering.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/Target/PowerPC/PPCISelLowering.cpp b/lib/Target/PowerPC/PPCISelLowering.cpp index 40c007e..46b97e1 100644 --- a/lib/Target/PowerPC/PPCISelLowering.cpp +++ b/lib/Target/PowerPC/PPCISelLowering.cpp @@ -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"); } |