Constant vectors are currently spilled/loaded from memory often. This series increases the number of costed patterns via a catch-all pattern and fixes a variety of bugs I found along the way.
v2 Changelog: * Landed patch 1/9 from v1 of this patchset. * Add new valid_vec_immediate_p helper * Reorder "Handle 0.0 floating point pattern ..." to use riscv-v.h. * Fix build failure on patches 6-8 that was previously fixed by patch 9. * Append RFC to series. Patrick O'Neill (9): RISC-V: Fix vid const vector expander for non-npatterns size steps RISC-V: Reorder insn cost match order to match corresponding expander match order RISC-V: Handle case when constant vector construction target rtx is not a register RISC-V: Emit costs for bool and stepped const vectors RISC-V: Handle 0.0 floating point pattern costing to match const_vector expander RISC-V: Allow non-duplicate bool patterns in expand_const_vector RISC-V: Move helper functions above expand_const_vector RISC-V: Add vslide1up/down pattern to expand_const_vector RISC-V: Add cost model asserts gcc/config/riscv/riscv-v.cc | 389 ++++++++++-------- gcc/config/riscv/riscv-v.h | 158 +++++++ gcc/config/riscv/riscv.cc | 209 +++++++++- .../riscv/rvv/autovec/materialize-1.c | 13 + .../riscv/rvv/autovec/materialize-2.c | 13 + .../riscv/rvv/autovec/materialize-3.c | 13 + .../riscv/rvv/autovec/materialize-4.c | 13 + .../riscv/rvv/autovec/materialize-5.c | 13 + .../riscv/rvv/autovec/materialize-6.c | 13 + 9 files changed, 651 insertions(+), 183 deletions(-) create mode 100644 gcc/config/riscv/riscv-v.h create mode 100644 gcc/testsuite/gcc.target/riscv/rvv/autovec/materialize-1.c create mode 100644 gcc/testsuite/gcc.target/riscv/rvv/autovec/materialize-2.c create mode 100644 gcc/testsuite/gcc.target/riscv/rvv/autovec/materialize-3.c create mode 100644 gcc/testsuite/gcc.target/riscv/rvv/autovec/materialize-4.c create mode 100644 gcc/testsuite/gcc.target/riscv/rvv/autovec/materialize-5.c create mode 100644 gcc/testsuite/gcc.target/riscv/rvv/autovec/materialize-6.c -- 2.34.1