[llvm] [RISCV][GISEL] instruction-select for G_SPLAT_VECTOR (PR #111193)

Tobias Stadler via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 4 13:02:38 PDT 2024


tobias-stadler wrote:

> It would be really nice for the InstructionSelector to know that instructions need to be selected after selecting the current instruction.

I do have a prototype for this, but I am not sure that the additional complexity it adds to InstructionSelect is worth it compared to just calling select recursively. 

preISelLower is intended for slightly changing an instruction and then continuing selection for that changed instruction. Here, we probably want to create the generic instructions, recursively call select on them and then return from the original select call instead of continuing selection. Introducing earlySelect() would be an option, but this exists primarily for overriding the imported SelectionDAG patterns. Is this necessary here, does SelectionDAG even have imported patterns for G_SPLAT_VECTOR?
Can't we just add this lowering code to a function and call it from the normal selection switch statement? 

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


More information about the llvm-commits mailing list