[llvm] [RISCV] Reduce spill/reload pairs when Xqcilo extension is enabled (PR #212807)

Sam Elliott via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 29 14:54:55 PDT 2026


lenary wrote:

I think in our previous discussions I missed that there was an interaction with `AddedComplexity`.

I think we can remove the `AddedComplexity` on the xqcilo patterns, which should mean that the 32-bit instructions are chosen over the xqcilo instructions for frame indices.

I think that still means you need your later changes, because we don't know how far a frame index is from its base register until PEI, which is long after isel, so we may still want to upgrade a 32-bit load/store into a Xqcilo load/store.

We probably do want to keep the FrameIndex code deleted from the complex pattern's body, to make sure we always make a LW/SW rather than a QC_E_LW/QC_E_SW for frame indexes. There's a little bit of leftover code about frame indexes that maybe we can remove from the `SelectAddrRegImm26` matcher, though i think it covers a case where a 32-bit load/store can definitely not be used.



https://github.com/llvm/llvm-project/pull/212807


More information about the llvm-commits mailing list