[llvm] [RISCV] Generate MIPS load/store pair instructions (PR #124717)

Djordje Todorovic via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 25 03:55:37 PST 2025


djtodoro wrote:

> > > A thought: The lowering path can be:
> > > 
> > > 1. Merge two consecutive load/stores into **pseudo** load/store pair instructions no matter what the offsets are.
> > > 2. Expand these pseudos in `RISCVExpandPseudo` by checking if their offsets are valid.
> > > 
> > > In this way, other vendor pair extensions like THead's can also benefit from this pass.
> > 
> > 
> > Why couldn't we check the offsets in this pass?
> 
> Yes we could. I was thinking that we may make use of PseudoInstExpansion.

I also think that this Pass can be reused for other vendors and for that use case you mentioned, but especially when we add more load/store optimizations such as the ones implemented in `AArch64LoadStoreOpt` this Pass will be more beneficial.

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


More information about the llvm-commits mailing list