[PATCH] D48129: [RISCV] Improved lowering for bit-wise atomicrmw {i8, i16} on RV32A

Alex Bradbury via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 13 08:13:29 PDT 2018


asb created this revision.
asb added reviewers: jyknight, jfb, eli.friedman, theraven.
Herald added subscribers: rogfer01, mgrang, edward-jones, zzheng, shiva0217, kito-cheng, niosHD, sabuasal, apazos, simoncook, johnrusso, rbar.
asb added a dependency: D47882: [RISCV] Codegen for i8, i16, and i32 atomicrmw with RV32A.

The 32-bit AMO{ADD,OR,XOR}_W instructions can be used to implement 8/16-bit AMOs with appropriate manipulation of the operands. This is preferable to creating an LL/SC loop and using the generic path for RISC-V masked atomicrmw codegen.

There is an argument for merging with https://reviews.llvm.org/D47882, but there seemed merit in keeping it separate given that this is an optimisation on top of the more generic lowering strategy path which is being reviewed in that patch.


https://reviews.llvm.org/D48129

Files:
  include/llvm/IR/IntrinsicsRISCV.td
  lib/Target/RISCV/RISCVExpandPseudoInsts.cpp
  lib/Target/RISCV/RISCVISelLowering.cpp
  lib/Target/RISCV/RISCVInstrInfoA.td
  test/CodeGen/RISCV/atomic-rmw.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D48129.151171.patch
Type: text/x-patch
Size: 36422 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180613/67867b31/attachment.bin>


More information about the llvm-commits mailing list