This series is intended to fix some test failures on
vect-reduc-chain-*.c by adding the [su]dot_prod* expand for LSX and LASX
vector modes.  But the code base of the related instructions was not
readable, so clean it up first (using the approach learnt from AArch64)
before adding the expands.

v2 => v3:

- Move the introduction of V1TI and V2TI from patch 3 to patch 2, so
  each commit is buildable.

v1 => v2:

- Only simplify vpick{ev,od}, not xvpick{ev,od} (where
  vect_par_cnst_even_or_odd_half is not suitable).
- Keep {sign,zero}_extend out of vec_select.
- Remove vect_par_cnst_{even,odd}_half for simd_h<optab>w_<mode>_<su>,
  to simplify the code and allow it to match the RTL in case the even
  half is selected for the left operand of addsub.  Swap the operands if
  needed when outputting the asm.
- Fix typos in commit subjects.
- Mention V2TI in loongarch-modes.def.

v2 bootstrapped and regtested on loongarch64-linux-gnu, no new code
change in v3.  Ok for trunk?

Xi Ruoyao (8):
  LoongArch: Try harder using vrepli instructions to materialize const
    vectors
  LoongArch: Allow moving TImode vectors
  LoongArch: Simplify {lsx_,lasx_x}v{add,sub,mul}l{ev,od} description
  LoongArch: Simplify {lsx_,lasx_x}vh{add,sub}w description
  LoongArch: Simplify {lsx_,lasx_x}vmaddw description
  LoongArch: Simplify lsx_vpick description
  LoongArch: Implement vec_widen_mult_{even,odd}_* for LSX and LASX
    modes
  LoongArch: Implement [su]dot_prod* for LSX and LASX modes

 gcc/config/loongarch/constraints.md           |    2 +-
 gcc/config/loongarch/lasx.md                  | 1070 +----------------
 gcc/config/loongarch/loongarch-builtins.cc    |   60 +
 gcc/config/loongarch/loongarch-modes.def      |    5 +-
 gcc/config/loongarch/loongarch-protos.h       |    3 +
 gcc/config/loongarch/loongarch.cc             |   50 +-
 gcc/config/loongarch/loongarch.md             |    2 +-
 gcc/config/loongarch/lsx.md                   | 1006 +---------------
 gcc/config/loongarch/predicates.md            |   27 +
 gcc/config/loongarch/simd.md                  |  390 +++++-
 gcc/testsuite/gcc.target/loongarch/vrepli.c   |   15 +
 .../gcc.target/loongarch/wide-mul-reduc-1.c   |   18 +
 .../gcc.target/loongarch/wide-mul-reduc-2.c   |   18 +
 13 files changed, 612 insertions(+), 2054 deletions(-)
 create mode 100644 gcc/testsuite/gcc.target/loongarch/vrepli.c
 create mode 100644 gcc/testsuite/gcc.target/loongarch/wide-mul-reduc-1.c
 create mode 100644 gcc/testsuite/gcc.target/loongarch/wide-mul-reduc-2.c

-- 
2.48.1

Reply via email to