From: Pan Li <[email protected]>

This patch would like to introduce the combine of vec_dup + vwmaccu.wv
into vwmaccu.wx on the cost value of GR2VR.  The late-combine will
take place if the cost of GR2VRlike 1, 2, 15 in test.

The combine only works from uint32_t to uint64_t widening.

From:
 |   ...
 |   vmv.v.x
 | L1:
 |   vwmaccu.wv
 |   J L1
 |   ...

To:
 |   ...
 | L1:
 |   vwmaccu.wx
 |   J L1
 |   ...

The below test suites are passed for this patch series.
* The rv64gcv fully regression test.

Pan Li (2):
  RISC-V: RISC-V: Combine vec_duplicate + vwmaccu.vv to vwmaccu.vx on GR2VR cost
  RISC-V: Add test for vec_duplicate + vwmaccu.vv combine with GR2VR cost 0, 1 
and 15

 gcc/config/riscv/autovec-opt.md               | 25 +++++++++
 gcc/config/riscv/vector.md                    | 50 +++++++++++++++++
 .../riscv/rvv/autovec/vx_vf/vx-1-u16.c        |  2 +
 .../riscv/rvv/autovec/vx_vf/vx-1-u32.c        |  2 +
 .../riscv/rvv/autovec/vx_vf/vx-1-u64.c        |  2 +
 .../riscv/rvv/autovec/vx_vf/vx-2-u16.c        |  2 +
 .../riscv/rvv/autovec/vx_vf/vx-2-u32.c        |  2 +
 .../riscv/rvv/autovec/vx_vf/vx-2-u64.c        |  2 +
 .../riscv/rvv/autovec/vx_vf/vx-3-u16.c        |  2 +
 .../riscv/rvv/autovec/vx_vf/vx-3-u32.c        |  2 +
 .../riscv/rvv/autovec/vx_vf/vx-3-u64.c        |  2 +
 .../rvv/autovec/vx_vf/vx_vwmaccu-run-1-u64.c  | 18 +++++++
 .../riscv/rvv/autovec/vx_vf/vx_widen.h        | 21 ++++++++
 .../riscv/rvv/autovec/vx_vf/vx_widen_data.h   | 54 +++++++++++++++++++
 14 files changed, 186 insertions(+)
 create mode 100644 
gcc/testsuite/gcc.target/riscv/rvv/autovec/vx_vf/vx_vwmaccu-run-1-u64.c

-- 
2.43.0

Reply via email to