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

Jessica Clarke via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 24 15:43:20 PDT 2023


jrtc27 added a comment.

In D158673#4615395 <https://reviews.llvm.org/D158673#4615395>, @jrtc27 wrote:

> In D158673#4615391 <https://reviews.llvm.org/D158673#4615391>, @craig.topper wrote:
>
>> In D158673#4615369 <https://reviews.llvm.org/D158673#4615369>, @jrtc27 wrote:
>>
>>> (But AArch64 does mark ATOMIC_LOAD_ADD as LibCall already)
>>
>> So AArch64 would fail your suggestion "just check if add is legal, use that if so, otherwise fall back on a libcall?" since add wouldn't be legal it would be libcall.
>
> I guess "not Expand" rather than "is Legal" then?

(or "is Legal or LibCall" depending on your view of Custom)


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