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

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 10 11:59:12 PDT 2024


topperc wrote:

> > We want the constant to be folded as an operand of the final instruction. It needs to be visible to a complex render function that is called by the isel table. selectRISCVIConstant creates the constant in a separate register.
> 
> So the issue is vector constants look different in the DAG and GISel? Could we have the pattern importer start to recognize the G_SPLAT_VECTOR case, instead of the G_BUILD_VECTOR of constants?

I don't think we're talking about vector constants here. The code calls buildConstant(sXLen, -1) to create an all ones constant for number of vector elements to process where all ones means all elements.

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


More information about the llvm-commits mailing list