[llvm] [RISCV][GISEL] Add IRTranslation for shufflevector on scalable vector types (PR #80378)

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 6 08:00:11 PST 2024


topperc wrote:

> > SelectionDAG doesn't support ISD::SHUFFLEVECTOR for scalable vectors. It only supports ISD::SPLAT_VECTOR. Are we trying to do something different for GISel for some reason?
> 
> 
> 
> I intend to write a patch after this that combines g_insert_element + g_shuffle_vector into g_splat_vector where appropriate. For scalable vectors, that is in all cases since the mask index vector is always zeroinit (undef case can be treated as zeroinit). 
> 
> 

What if the G_INSERT_ELT doesn't exist? SelectionDAG always creates an extract+splat_vector when it translates a scalable shufflevector.

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


More information about the llvm-commits mailing list