[llvm] [RISCV][GISEL] Legalize and post-legalize lower G_INSERT_SUBVECTOR (PR #108859)
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 17 10:42:41 PDT 2024
topperc wrote:
> What is the difference between hosting this code at:
>
> * the legalizer
>
> * the post legalizer lower combiner
>
> * the instruction selector?
Emitting a bunch of target specific opcodes from the legalizer makes it very hard to do any optimizations that may be exposed by legalizing the types.
Doing it in instruction selection means we can't reuse tablegen patterns. There are up to 34 different variants of instructions considering element width and vector width.
Lowering allows us to select target specific generic nodes after after post legalizer optimizations and still use tablegen patterns.
https://github.com/llvm/llvm-project/pull/108859
More information about the llvm-commits
mailing list