[PATCH] D31287: [mips] Fix atomic compare and swap at O0, v2

Simon Dardis via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 23 08:18:52 PDT 2017


sdardis created this revision.
Herald added a subscriber: mgorny.

Similar to PR/25526, fast-regalloc introduces spills at the end of basic
blocks. When this occurs in between an ll and sc, the store can cause the
atomic sequence to fail.

This patch fixes the issue by introducing more pseudos to represent atomic
operations and moving their lowering to after the expansion of postRA
pseudos.

This version addresses issues with the initial implementation and covers
all atomic operations.

This resolves PR/32020.

Thanks to James Cowgill for reporting the issue!


Repository:
  rL LLVM

https://reviews.llvm.org/D31287

Files:
  lib/Target/Mips/CMakeLists.txt
  lib/Target/Mips/Mips.h
  lib/Target/Mips/Mips64InstrInfo.td
  lib/Target/Mips/MipsExpandPseudo.cpp
  lib/Target/Mips/MipsISelLowering.cpp
  lib/Target/Mips/MipsISelLowering.h
  lib/Target/Mips/MipsInstrInfo.td
  lib/Target/Mips/MipsTargetMachine.cpp
  test/CodeGen/Mips/atomic.ll
  test/CodeGen/Mips/atomicCmpSwapPW.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D31287.92801.patch
Type: text/x-patch
Size: 69991 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170323/2c8f1f21/attachment.bin>


More information about the llvm-commits mailing list