[PATCH] D149488: [RISCV] Use AMOSWAP for 32 and 64-bit atomic stores

Paul Kirth via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 28 14:56:28 PDT 2023


paulkirth created this revision.
paulkirth added reviewers: craig.topper, asb, reames, phosek, mcgrathr, enh.
Herald added subscribers: jobnoorman, luke, VincentWu, vkmr, frasercrmck, evandro, luismarques, apazos, sameer.abuasal, s.egerton, Jim, benna, psnobl, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jones, zzheng, jrtc27, shiva0217, kito-cheng, niosHD, sabuasal, simoncook, johnrusso, rbar, hiraditya, arichardson.
Herald added a project: All.
paulkirth requested review of this revision.
Herald added subscribers: llvm-commits, pcwang-thead, eopXD, MaskRay.
Herald added a project: LLVM.

These are expected to be more performant and comply with the
recommendations in Hans Boehm's proposal for changes to table A.6 of the
unprivileged spec and the RISC-V psABI. Further details can be found in
the psABI proposal:
https://github.com/riscv-non-isa/riscv-elf-psabi-doc/pull/378.

The proposal suggests that as an optimization, the memory_order_seq_cst
store mapping may be replaced by the following for 32- and 64-bit
operands:

  amoswap.rl{w|d};

Depends on: D149486 <https://reviews.llvm.org/D149486>


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D149488

Files:
  llvm/lib/Target/RISCV/RISCVISelLowering.cpp
  llvm/lib/Target/RISCV/RISCVISelLowering.h
  llvm/test/CodeGen/RISCV/atomic-load-store.ll
  llvm/test/CodeGen/RISCV/forced-atomics.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D149488.518062.patch
Type: text/x-patch
Size: 7470 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230428/9a0718ad/attachment.bin>


More information about the llvm-commits mailing list