From: Pan Li <pan2...@intel.com>

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

From:
 |   ...
 |   vmv.v.x
 | L1:
 |   vmadd.vv
 |   J L1
 |   ...

To:
 |   ...
 | L1:
 |   vmadd.vx
 |   J L1
 |   ...

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

Pan Li (4):
  RISC-V: Combine vec_duplicate + vmadd.vv to vmadd.vx on GR2VR cost
  RISC-V: Adjust the vmacc.vx combine test cases
  RISC-V: Add test for vec_duplicate + vmadd.vv signed combine with GR2VR cost 
0, 1 and 15
  RISC-V: Add test for vec_duplicate + vmadd.vv unsigned combine with GR2VR 
cost 0, 1 and 15

 gcc/config/riscv/autovec-opt.md               |   8 +-
 gcc/config/riscv/vector.md                    | 172 ++++----
 .../riscv/rvv/autovec/vx_vf/vx-1-i16.c        |   1 +
 .../riscv/rvv/autovec/vx_vf/vx-1-i32.c        |   1 +
 .../riscv/rvv/autovec/vx_vf/vx-1-i64.c        |   1 +
 .../riscv/rvv/autovec/vx_vf/vx-1-i8.c         |   1 +
 .../riscv/rvv/autovec/vx_vf/vx-1-u16.c        |   1 +
 .../riscv/rvv/autovec/vx_vf/vx-1-u32.c        |   1 +
 .../riscv/rvv/autovec/vx_vf/vx-1-u64.c        |   1 +
 .../riscv/rvv/autovec/vx_vf/vx-1-u8.c         |   1 +
 .../riscv/rvv/autovec/vx_vf/vx-2-i16.c        |   1 +
 .../riscv/rvv/autovec/vx_vf/vx-2-i32.c        |   1 +
 .../riscv/rvv/autovec/vx_vf/vx-2-i64.c        |   1 +
 .../riscv/rvv/autovec/vx_vf/vx-2-i8.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-2-u8.c         |   1 +
 .../riscv/rvv/autovec/vx_vf/vx-3-i16.c        |   1 +
 .../riscv/rvv/autovec/vx_vf/vx-3-i32.c        |   1 +
 .../riscv/rvv/autovec/vx_vf/vx-3-i64.c        |   1 +
 .../riscv/rvv/autovec/vx_vf/vx-3-i8.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-3-u8.c         |   1 +
 .../riscv/rvv/autovec/vx_vf/vx_ternary.h      |  25 +-
 .../riscv/rvv/autovec/vx_vf/vx_ternary_data.h | 368 ++++++++++++++++++
 .../rvv/autovec/vx_vf/vx_vmadd-run-1-i16.c    |  16 +
 .../rvv/autovec/vx_vf/vx_vmadd-run-1-i32.c    |  16 +
 .../rvv/autovec/vx_vf/vx_vmadd-run-1-i64.c    |  16 +
 .../rvv/autovec/vx_vf/vx_vmadd-run-1-i8.c     |  16 +
 .../rvv/autovec/vx_vf/vx_vmadd-run-1-u16.c    |  16 +
 .../rvv/autovec/vx_vf/vx_vmadd-run-1-u32.c    |  16 +
 .../rvv/autovec/vx_vf/vx_vmadd-run-1-u64.c    |  16 +
 .../rvv/autovec/vx_vf/vx_vmadd-run-1-u8.c     |  16 +
 36 files changed, 635 insertions(+), 90 deletions(-)
 create mode 100644 
gcc/testsuite/gcc.target/riscv/rvv/autovec/vx_vf/vx_vmadd-run-1-i16.c
 create mode 100644 
gcc/testsuite/gcc.target/riscv/rvv/autovec/vx_vf/vx_vmadd-run-1-i32.c
 create mode 100644 
gcc/testsuite/gcc.target/riscv/rvv/autovec/vx_vf/vx_vmadd-run-1-i64.c
 create mode 100644 
gcc/testsuite/gcc.target/riscv/rvv/autovec/vx_vf/vx_vmadd-run-1-i8.c
 create mode 100644 
gcc/testsuite/gcc.target/riscv/rvv/autovec/vx_vf/vx_vmadd-run-1-u16.c
 create mode 100644 
gcc/testsuite/gcc.target/riscv/rvv/autovec/vx_vf/vx_vmadd-run-1-u32.c
 create mode 100644 
gcc/testsuite/gcc.target/riscv/rvv/autovec/vx_vf/vx_vmadd-run-1-u64.c
 create mode 100644 
gcc/testsuite/gcc.target/riscv/rvv/autovec/vx_vf/vx_vmadd-run-1-u8.c

-- 
2.43.0

Reply via email to