projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
866bdad
)
Insert code in the right location when lowering PowerPC atomics.
author
Jakob Stoklund Olesen
<stoklund@2pi.dk>
Mon, 4 Apr 2011 17:57:29 +0000
(17:57 +0000)
committer
Jakob Stoklund Olesen
<stoklund@2pi.dk>
Mon, 4 Apr 2011 17:57:29 +0000
(17:57 +0000)
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
lib/Target/PowerPC/PPCISelLowering.cpp
patch
|
blob
|
history
diff --git
a/lib/Target/PowerPC/PPCISelLowering.cpp
b/lib/Target/PowerPC/PPCISelLowering.cpp
index 40c007eaf96a50b8547db824f7c827975c897530..46b97e1334687349b1b1d62959970797917c6a6e 100644
(file)
--- 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");
}