[llvm] [RISCV][MC] Restrict mips.ldp / mips.sdp to RV64 only (PR #227043)
Djordje Todorovic via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 1 23:25:07 PDT 2026
djtodoro wrote:
> Thanks for reviewing!
>
> > I would additional guard into the RISCVSubtarget::useLoadStorePairs() predicate for this as well.
>
> The [load/store optimizer](https://github.com/llvm/llvm-project/blob/ce0affc054bbdae90c7c7d8a50bfabd5047ebb50/llvm/lib/Target/RISCV/RISCVLoadStoreOptimizer.cpp#L489-L507) only forms `MIPS_LDP/MIPS_SDP` from the RV64-only `LD/SD` opcodes. Adding an RV64 guard to this predicate would also disable `LWP/SWP` pairing on RV32, so I think we should keep it unchanged.
Oh, it does make sense. LGTM!
https://github.com/llvm/llvm-project/pull/227043
More information about the llvm-commits
mailing list