[llvm] [RISCV][GISEL] Legalize G_INSERT_VECTOR_ELT (PR #108250)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Sun Sep 15 04:57:12 PDT 2024


arsenm wrote:

> > You can just directly consume the constant index case of G_INSERT_VECTOR_ELT, G_INSERT doesn't really buy anything other than pulling in the constant
> 
> What do you mean?

I mean instead of legalizing G_INSERT_VECTOR_ELT with a known constant index by turning it into G_INSERT, you can simply pass it through as a legal operation and directly select it. You still need to do something to expand the variable index case, but the constants can be equally well represented with the more restricted vector operations 

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


More information about the llvm-commits mailing list