Bootstrapped and regtested on s390x-redhat-linux with --with-arch=z15.
Ok for master?

This patch series implements storing long doubles in vector registers
on z14+.  Patch 1 is the actual implementation, patch 2 adds tests.

v1: https://gcc.gnu.org/pipermail/gcc-patches/2020-November/557968.html
v1 -> v2:
* Committed cleanups.
* Do not use general_operand for *cmptf_ccs.
* Fix expander condition mismatches.
* Move tests to from zvector to vector, do not use -mzvector.
* Merge scan and run tests where possible.

Ilya Leoshkevich (2):
  IBM Z: Store long doubles in vector registers when possible
  IBM Z: Test long doubles in vector registers

 gcc/config/s390/s390-modes.def                |   5 +-
 gcc/config/s390/s390-protos.h                 |   1 +
 gcc/config/s390/s390.c                        |  57 ++-
 gcc/config/s390/s390.h                        |  35 ++
 gcc/config/s390/s390.md                       | 209 ++++++----
 gcc/config/s390/s390.opt                      |  11 +
 gcc/config/s390/vector.md                     | 382 ++++++++++++++++--
 gcc/config/s390/vx-builtins.md                |  38 +-
 .../s390/vector/long-double-callee-abi-scan.c |  20 +
 .../s390/vector/long-double-caller-abi-run.c  |   4 +
 .../s390/vector/long-double-caller-abi-scan.c |  13 +
 .../s390/vector/long-double-copysign.c        |  21 +
 .../s390/vector/long-double-fprx2-constant.c  |  11 +
 .../s390/vector/long-double-from-double.c     |  18 +
 .../s390/vector/long-double-from-float.c      |  19 +
 .../s390/vector/long-double-from-i16.c        |  19 +
 .../s390/vector/long-double-from-i32.c        |  19 +
 .../s390/vector/long-double-from-i64.c        |  19 +
 .../s390/vector/long-double-from-i8.c         |  19 +
 .../s390/vector/long-double-from-u16.c        |  19 +
 .../s390/vector/long-double-from-u32.c        |  19 +
 .../s390/vector/long-double-from-u64.c        |  19 +
 .../s390/vector/long-double-from-u8.c         |  19 +
 .../s390/vector/long-double-to-double.c       |  18 +
 .../s390/vector/long-double-to-float.c        |  19 +
 .../s390/vector/long-double-to-i16.c          |  19 +
 .../s390/vector/long-double-to-i32.c          |  19 +
 .../s390/vector/long-double-to-i64.c          |  21 +
 .../s390/vector/long-double-to-i8.c           |  19 +
 .../s390/vector/long-double-to-u16.c          |  20 +
 .../s390/vector/long-double-to-u32.c          |  20 +
 .../s390/vector/long-double-to-u64.c          |  20 +
 .../s390/vector/long-double-to-u8.c           |  20 +
 .../s390/vector/long-double-vec-duplicate.c   |  13 +
 .../gcc.target/s390/vector/long-double-wf.h   |  60 +++
 .../s390/vector/long-double-wfaxb.c           |  17 +
 .../s390/vector/long-double-wfcxb-0001.c      |   9 +
 .../s390/vector/long-double-wfcxb-0111.c      |   9 +
 .../s390/vector/long-double-wfcxb-1011.c      |   9 +
 .../s390/vector/long-double-wfcxb-1101.c      |   9 +
 .../s390/vector/long-double-wfdxb.c           |  17 +
 .../s390/vector/long-double-wfixb.c           |   7 +
 .../s390/vector/long-double-wfkxb-0111.c      |   9 +
 .../s390/vector/long-double-wfkxb-1011.c      |   9 +
 .../s390/vector/long-double-wfkxb-1101.c      |   9 +
 .../s390/vector/long-double-wflcxb.c          |   7 +
 .../s390/vector/long-double-wflpxb.c          |   7 +
 .../s390/vector/long-double-wfmaxb-2.c        |  24 ++
 .../s390/vector/long-double-wfmaxb-3.c        |  14 +
 .../s390/vector/long-double-wfmaxb-disabled.c |   8 +
 .../s390/vector/long-double-wfmaxb.c          |   7 +
 .../s390/vector/long-double-wfmsxb-disabled.c |   8 +
 .../s390/vector/long-double-wfmsxb.c          |   7 +
 .../s390/vector/long-double-wfmxb.c           |   7 +
 .../vector/long-double-wfnmaxb-disabled.c     |   9 +
 .../s390/vector/long-double-wfnmaxb.c         |   7 +
 .../vector/long-double-wfnmsxb-disabled.c     |   9 +
 .../s390/vector/long-double-wfnmsxb.c         |   7 +
 .../s390/vector/long-double-wfsqxb.c          |   7 +
 .../s390/vector/long-double-wfsxb-1.c         |  21 +
 .../s390/vector/long-double-wfsxb.c           |   7 +
 .../s390/vector/long-double-wftcixb-1.c       |  15 +
 .../s390/vector/long-double-wftcixb.c         |   7 +
 63 files changed, 1412 insertions(+), 134 deletions(-)
 create mode 100644 
gcc/testsuite/gcc.target/s390/vector/long-double-callee-abi-scan.c
 create mode 100644 
gcc/testsuite/gcc.target/s390/vector/long-double-caller-abi-run.c
 create mode 100644 
gcc/testsuite/gcc.target/s390/vector/long-double-caller-abi-scan.c
 create mode 100644 gcc/testsuite/gcc.target/s390/vector/long-double-copysign.c
 create mode 100644 
gcc/testsuite/gcc.target/s390/vector/long-double-fprx2-constant.c
 create mode 100644 
gcc/testsuite/gcc.target/s390/vector/long-double-from-double.c
 create mode 100644 
gcc/testsuite/gcc.target/s390/vector/long-double-from-float.c
 create mode 100644 gcc/testsuite/gcc.target/s390/vector/long-double-from-i16.c
 create mode 100644 gcc/testsuite/gcc.target/s390/vector/long-double-from-i32.c
 create mode 100644 gcc/testsuite/gcc.target/s390/vector/long-double-from-i64.c
 create mode 100644 gcc/testsuite/gcc.target/s390/vector/long-double-from-i8.c
 create mode 100644 gcc/testsuite/gcc.target/s390/vector/long-double-from-u16.c
 create mode 100644 gcc/testsuite/gcc.target/s390/vector/long-double-from-u32.c
 create mode 100644 gcc/testsuite/gcc.target/s390/vector/long-double-from-u64.c
 create mode 100644 gcc/testsuite/gcc.target/s390/vector/long-double-from-u8.c
 create mode 100644 gcc/testsuite/gcc.target/s390/vector/long-double-to-double.c
 create mode 100644 gcc/testsuite/gcc.target/s390/vector/long-double-to-float.c
 create mode 100644 gcc/testsuite/gcc.target/s390/vector/long-double-to-i16.c
 create mode 100644 gcc/testsuite/gcc.target/s390/vector/long-double-to-i32.c
 create mode 100644 gcc/testsuite/gcc.target/s390/vector/long-double-to-i64.c
 create mode 100644 gcc/testsuite/gcc.target/s390/vector/long-double-to-i8.c
 create mode 100644 gcc/testsuite/gcc.target/s390/vector/long-double-to-u16.c
 create mode 100644 gcc/testsuite/gcc.target/s390/vector/long-double-to-u32.c
 create mode 100644 gcc/testsuite/gcc.target/s390/vector/long-double-to-u64.c
 create mode 100644 gcc/testsuite/gcc.target/s390/vector/long-double-to-u8.c
 create mode 100644 
gcc/testsuite/gcc.target/s390/vector/long-double-vec-duplicate.c
 create mode 100644 gcc/testsuite/gcc.target/s390/vector/long-double-wf.h
 create mode 100644 gcc/testsuite/gcc.target/s390/vector/long-double-wfaxb.c
 create mode 100644 
gcc/testsuite/gcc.target/s390/vector/long-double-wfcxb-0001.c
 create mode 100644 
gcc/testsuite/gcc.target/s390/vector/long-double-wfcxb-0111.c
 create mode 100644 
gcc/testsuite/gcc.target/s390/vector/long-double-wfcxb-1011.c
 create mode 100644 
gcc/testsuite/gcc.target/s390/vector/long-double-wfcxb-1101.c
 create mode 100644 gcc/testsuite/gcc.target/s390/vector/long-double-wfdxb.c
 create mode 100644 gcc/testsuite/gcc.target/s390/vector/long-double-wfixb.c
 create mode 100644 
gcc/testsuite/gcc.target/s390/vector/long-double-wfkxb-0111.c
 create mode 100644 
gcc/testsuite/gcc.target/s390/vector/long-double-wfkxb-1011.c
 create mode 100644 
gcc/testsuite/gcc.target/s390/vector/long-double-wfkxb-1101.c
 create mode 100644 gcc/testsuite/gcc.target/s390/vector/long-double-wflcxb.c
 create mode 100644 gcc/testsuite/gcc.target/s390/vector/long-double-wflpxb.c
 create mode 100644 gcc/testsuite/gcc.target/s390/vector/long-double-wfmaxb-2.c
 create mode 100644 gcc/testsuite/gcc.target/s390/vector/long-double-wfmaxb-3.c
 create mode 100644 
gcc/testsuite/gcc.target/s390/vector/long-double-wfmaxb-disabled.c
 create mode 100644 gcc/testsuite/gcc.target/s390/vector/long-double-wfmaxb.c
 create mode 100644 
gcc/testsuite/gcc.target/s390/vector/long-double-wfmsxb-disabled.c
 create mode 100644 gcc/testsuite/gcc.target/s390/vector/long-double-wfmsxb.c
 create mode 100644 gcc/testsuite/gcc.target/s390/vector/long-double-wfmxb.c
 create mode 100644 
gcc/testsuite/gcc.target/s390/vector/long-double-wfnmaxb-disabled.c
 create mode 100644 gcc/testsuite/gcc.target/s390/vector/long-double-wfnmaxb.c
 create mode 100644 
gcc/testsuite/gcc.target/s390/vector/long-double-wfnmsxb-disabled.c
 create mode 100644 gcc/testsuite/gcc.target/s390/vector/long-double-wfnmsxb.c
 create mode 100644 gcc/testsuite/gcc.target/s390/vector/long-double-wfsqxb.c
 create mode 100644 gcc/testsuite/gcc.target/s390/vector/long-double-wfsxb-1.c
 create mode 100644 gcc/testsuite/gcc.target/s390/vector/long-double-wfsxb.c
 create mode 100644 gcc/testsuite/gcc.target/s390/vector/long-double-wftcixb-1.c
 create mode 100644 gcc/testsuite/gcc.target/s390/vector/long-double-wftcixb.c

-- 
2.25.4

Reply via email to