[PATCH] D106039: [AArch64] Fix i128 cmpxchg using ldxp/stxp.

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 14 23:25:49 PDT 2021


efriedma created this revision.
efriedma added reviewers: paquette, t.p.northover, dmgreen, SjoerdMeijer.
Herald added subscribers: danielkiss, jfb, hiraditya, kristof.beyls.
efriedma requested review of this revision.
Herald added a project: LLVM.

Basically two parts to this fix:

1. Stop using AtomicExpand to expand cmpxchg i128
2. Fix AArch64ExpandPseudoInsts to use a correct expansion.  In particular, we can't exit the loop until an stxp succeeds; otherwise, the load can tear.

Fixes https://bugs.llvm.org/show_bug.cgi?id=51102


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D106039

Files:
  llvm/lib/Target/AArch64/AArch64ExpandPseudoInsts.cpp
  llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
  llvm/lib/Target/AArch64/AArch64InstrAtomics.td
  llvm/lib/Target/AArch64/GISel/AArch64LegalizerInfo.cpp
  llvm/test/CodeGen/AArch64/GlobalISel/arm64-atomic-128.ll
  llvm/test/CodeGen/AArch64/GlobalISel/legalize-cmpxchg-128.mir
  llvm/test/CodeGen/AArch64/arm64-atomic-128.ll
  llvm/test/CodeGen/AArch64/atomicrmw-O0.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D106039.358845.patch
Type: text/x-patch
Size: 16882 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210715/8c3591cd/attachment.bin>


More information about the llvm-commits mailing list