[PATCH] D158673: [SDAG][RISCV] Avoid neg instructions when lowering atomic_load_sub with a constant rhs
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 23 14:43:19 PDT 2023
craig.topper added inline comments.
================
Comment at: llvm/lib/Target/RISCV/RISCVISelLowering.cpp:1241
+ setOperationAction(ISD::ATOMIC_LOAD_SUB, MVT::i32, Custom);
+ if (Subtarget.is64Bit())
+ setOperationAction(ISD::ATOMIC_LOAD_SUB, MVT::i64, Custom);
----------------
Why do we need to handle i32 on RV64? Wouldn't it be enough to do XLenLLT and remove the change to ReplaceNodeResults?
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