From: Pan Li <[email protected]>

This patch would like to introduce the combine of vec_dup + vwsubu.wv
into vwsubu.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:
 |   vwsubu.wv
 |   J L1
 |   ...

To:
 |   ...
 | L1:
 |   vwsubu.wx
 |   J L1
 |   ...

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

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

 gcc/config/riscv/autovec-opt.md               | 20 ++++++++++
 .../riscv/rvv/autovec/vx_vf/vx-1-u16.c        |  3 +-
 .../riscv/rvv/autovec/vx_vf/vx-1-u32.c        |  3 +-
 .../riscv/rvv/autovec/vx_vf/vx-1-u64.c        |  1 +
 .../riscv/rvv/autovec/vx_vf/vx-2-u16.c        |  1 +
 .../riscv/rvv/autovec/vx_vf/vx-2-u32.c        |  1 +
 .../riscv/rvv/autovec/vx_vf/vx-2-u64.c        |  1 +
 .../riscv/rvv/autovec/vx_vf/vx-3-u16.c        |  1 +
 .../riscv/rvv/autovec/vx_vf/vx-3-u32.c        |  1 +
 .../riscv/rvv/autovec/vx_vf/vx-3-u64.c        |  1 +
 .../riscv/rvv/autovec/vx_vf/vx_widen.h        |  1 +
 .../riscv/rvv/autovec/vx_vf/vx_widen_data.h   | 40 +++++++++++++++++++
 .../rvv/autovec/vx_vf/wx_vwsubu-run-1-u64.c   | 18 +++++++++
 13 files changed, 90 insertions(+), 2 deletions(-)
 create mode 100644 
gcc/testsuite/gcc.target/riscv/rvv/autovec/vx_vf/wx_vwsubu-run-1-u64.c

-- 
2.43.0

Reply via email to