[RISCV] Use v(f)slide1up for shuffle+insert idiom
authorPhilip Reames <preames@rivosinc.com>
Tue, 30 May 2023 14:07:11 +0000 (07:07 -0700)
committerPhilip Reames <listmail@philipreames.com>
Tue, 30 May 2023 14:37:41 +0000 (07:37 -0700)
commit544a240ff7ff5bbacd3d50692335a93665ded8d5
treef7a569d9b9ff8066932393912d618c0ee9d8e9f4
parent891fad0448fc560877e67c980754c1c4a5c83735
[RISCV] Use v(f)slide1up for shuffle+insert idiom

This is pretty straight forward in the basic form. I did need to move the slideup matching earlier, but that looks generally profitable on it's own.

As follow ups, I plan to explore the v(f)slide1down variants, and see what I can do to canonicalize the shuffle then insert pattern (see _inverse tests at the end of the vslide1up.ll test).

Differential Revision: https://reviews.llvm.org/D151468
llvm/lib/Target/RISCV/RISCVISelLowering.cpp
llvm/test/CodeGen/RISCV/rvv/fixed-vector-shuffle-transpose.ll
llvm/test/CodeGen/RISCV/rvv/fixed-vector-shuffle-vslide1up.ll