diff options
| author | Bill Schmidt <wschmidt@linux.vnet.ibm.com> | 2013-04-02 18:37:08 +0000 |
|---|---|---|
| committer | Bill Schmidt <wschmidt@linux.vnet.ibm.com> | 2013-04-02 18:37:08 +0000 |
| commit | 3581cd4b4ca59938c6ebce40d3b37a085ef23adc (patch) | |
| tree | 52a5bd198e0852fdf70dc916b7dbfa4e61e0200b /llvm/lib/Target/PowerPC/PPCISelLowering.cpp | |
| parent | 8fbfc59164b37f27854e3283c7c8812c8154f942 (diff) | |
| download | bcm5719-llvm-3581cd4b4ca59938c6ebce40d3b37a085ef23adc.tar.gz bcm5719-llvm-3581cd4b4ca59938c6ebce40d3b37a085ef23adc.zip | |
Fix PR15630: Replace faulty stdcx. with stwcx.
When doing a partword atomic operation, a lwarx was being paired with
a stdcx. instead of a stwcx. when compiling for a 64-bit target. The
target has nothing to do with it in this case; we always need a stwcx.
Thanks to Kai Nacke for reporting the problem.
llvm-svn: 178559
Diffstat (limited to 'llvm/lib/Target/PowerPC/PPCISelLowering.cpp')
| -rw-r--r-- | llvm/lib/Target/PowerPC/PPCISelLowering.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCISelLowering.cpp b/llvm/lib/Target/PowerPC/PPCISelLowering.cpp index 0d8bfb98159..ee43fc668e7 100644 --- a/llvm/lib/Target/PowerPC/PPCISelLowering.cpp +++ b/llvm/lib/Target/PowerPC/PPCISelLowering.cpp @@ -5960,7 +5960,7 @@ PPCTargetLowering::EmitPartwordAtomicBinary(MachineInstr *MI, .addReg(TmpReg).addReg(MaskReg); BuildMI(BB, dl, TII->get(is64bit ? PPC::OR8 : PPC::OR), Tmp4Reg) .addReg(Tmp3Reg).addReg(Tmp2Reg); - BuildMI(BB, dl, TII->get(is64bit ? PPC::STDCX : PPC::STWCX)) + BuildMI(BB, dl, TII->get(PPC::STWCX)) .addReg(Tmp4Reg).addReg(ZeroReg).addReg(PtrReg); BuildMI(BB, dl, TII->get(PPC::BCC)) .addImm(PPC::PRED_NE).addReg(PPC::CR0).addMBB(loopMBB); |

