[PATCH] D158673: [SDAG][RISCV] Avoid neg instructions when lowering atomic_load_sub with a constant rhs

Alex Bradbury via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 5 06:32:49 PDT 2023


asb added a comment.

Left a couple of very minor comment. The approach seems sound to me, but there's clear potential interaction with other targets and so I'd rather rely on a LGTM from someone who's been involved in this patch since the beginning, but can take a closer look if no-one has time.



================
Comment at: llvm/lib/Target/RISCV/RISCVISelLowering.cpp:1233
   if (Subtarget.hasForcedAtomics()) {
     // Set atomic rmw/cas operations to expand to force __sync libcalls.
     setOperationAction(
----------------
This comment is now out of date and should probably just be something like "Force __sync libcalls to be emitted for atomic rmw/cas operations."


================
Comment at: llvm/lib/Target/RISCV/RISCVInstrInfoA.td:336
 
 /// 64-bit AMOs
 
----------------
This "heading" now has nothing under it (and I think was in the wrong place anyway), so best delete it.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D158673/new/

https://reviews.llvm.org/D158673



More information about the llvm-commits mailing list