This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH v4 0/7] S/390: Use signaling FP comparison instructions
- From: Ilya Leoshkevich <iii at linux dot ibm dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: richard dot guenther at gmail dot com, richard dot sandiford at arm dot com, segher at kernel dot crashing dot org, joseph at codesourcery dot com, krebbel at linux dot ibm dot com, rdapp at linux dot ibm dot com, Ilya Leoshkevich <iii at linux dot ibm dot com>
- Date: Tue, 1 Oct 2019 15:27:02 +0200
- Subject: [PATCH v4 0/7] S/390: Use signaling FP comparison instructions
Bootstrapped and regtested on s390x-redhat-linux, x86_64-redhat-linux,
ppc64le-redhat-linux.
This patch series adds signaling FP comparison support (both scalar and
vector) to s390 backend.
Patches 1-3 make it possible to query supported vcond rtxes and make
use of that for z13.
Patches 4-5 are preparation cleanups.
Patch 6 is an actual implementation.
Path 7 contains new tests, that make sure autovectorized comparisons use
proper instructions.
Ilya Leoshkevich (7):
Allow COND_EXPR and VEC_COND_EXPR condtions to trap
Introduce can_vcond_compare_p function
S/390: Do not use signaling vector comparisons on z13
S/390: Implement vcond expander for V1TI,V1TF
S/390: Remove code duplication in vec_* comparison expanders
S/390: Use signaling FP comparison instructions
S/390: Test signaling FP comparison instructions
v1->v2:
Improve wording in documentation commit message.
Replace hook with optabs query.
Add signaling eq test.
v2->v3:
Allow COND_EXPR and VEC_COND_EXPR conditions to throw, while making
sure that GIMPLE_COND's condition still cannot throw.
Remove documentation patch (superseded by
https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=275303).
Add PR target/77918 reference.
v3->v4:
Committed alloca and vec_unordered bits separately.
Fixed issues in in gimple_could_trap_p_1.
Dropped unnecessary gimple_ternary_operands_ok_p.
Simplified vcondv1tiv1tf implementation.
Improved VEC_CMP_EXPAND naming.
Improved can_vcond_compare_p naming and streamlined implementation.
gcc/config/s390/2827.md | 14 +-
gcc/config/s390/2964.md | 13 +-
gcc/config/s390/3906.md | 17 +-
gcc/config/s390/8561.md | 19 +-
gcc/config/s390/s390-builtins.def | 16 +-
gcc/config/s390/s390-modes.def | 8 +
gcc/config/s390/s390.c | 38 ++-
gcc/config/s390/s390.md | 14 +
gcc/config/s390/vector.md | 260 ++++++++++++------
gcc/gimple-expr.c | 25 +-
gcc/gimple-expr.h | 1 +
gcc/gimple.c | 14 +-
gcc/gimplify.c | 5 +-
gcc/optabs-tree.c | 37 ++-
gcc/optabs.c | 38 ++-
gcc/optabs.h | 7 +
gcc/testsuite/gcc.target/s390/s390.exp | 8 +
.../gcc.target/s390/vector/vec-scalar-cmp-1.c | 8 +-
.../s390/zvector/autovec-double-quiet-eq.c | 8 +
.../s390/zvector/autovec-double-quiet-ge.c | 8 +
.../s390/zvector/autovec-double-quiet-gt.c | 8 +
.../s390/zvector/autovec-double-quiet-le.c | 8 +
.../s390/zvector/autovec-double-quiet-lt.c | 8 +
.../zvector/autovec-double-quiet-ordered.c | 10 +
.../s390/zvector/autovec-double-quiet-uneq.c | 10 +
.../zvector/autovec-double-quiet-unordered.c | 11 +
.../autovec-double-signaling-eq-z13-finite.c | 10 +
.../zvector/autovec-double-signaling-eq-z13.c | 9 +
.../zvector/autovec-double-signaling-eq.c | 11 +
.../autovec-double-signaling-ge-z13-finite.c | 10 +
.../zvector/autovec-double-signaling-ge-z13.c | 9 +
.../zvector/autovec-double-signaling-ge.c | 8 +
.../autovec-double-signaling-gt-z13-finite.c | 10 +
.../zvector/autovec-double-signaling-gt-z13.c | 9 +
.../zvector/autovec-double-signaling-gt.c | 8 +
.../autovec-double-signaling-le-z13-finite.c | 10 +
.../zvector/autovec-double-signaling-le-z13.c | 9 +
.../zvector/autovec-double-signaling-le.c | 8 +
.../autovec-double-signaling-lt-z13-finite.c | 10 +
.../zvector/autovec-double-signaling-lt-z13.c | 9 +
.../zvector/autovec-double-signaling-lt.c | 8 +
...autovec-double-signaling-ltgt-z13-finite.c | 9 +
.../autovec-double-signaling-ltgt-z13.c | 9 +
.../zvector/autovec-double-signaling-ltgt.c | 9 +
.../s390/zvector/autovec-double-smax-z13.F90 | 11 +
.../s390/zvector/autovec-double-smax.F90 | 8 +
.../s390/zvector/autovec-double-smin-z13.F90 | 11 +
.../s390/zvector/autovec-double-smin.F90 | 8 +
.../s390/zvector/autovec-float-quiet-eq.c | 8 +
.../s390/zvector/autovec-float-quiet-ge.c | 8 +
.../s390/zvector/autovec-float-quiet-gt.c | 8 +
.../s390/zvector/autovec-float-quiet-le.c | 8 +
.../s390/zvector/autovec-float-quiet-lt.c | 8 +
.../zvector/autovec-float-quiet-ordered.c | 10 +
.../s390/zvector/autovec-float-quiet-uneq.c | 10 +
.../zvector/autovec-float-quiet-unordered.c | 11 +
.../s390/zvector/autovec-float-signaling-eq.c | 11 +
.../s390/zvector/autovec-float-signaling-ge.c | 8 +
.../s390/zvector/autovec-float-signaling-gt.c | 8 +
.../s390/zvector/autovec-float-signaling-le.c | 8 +
.../s390/zvector/autovec-float-signaling-lt.c | 8 +
.../zvector/autovec-float-signaling-ltgt.c | 9 +
.../gcc.target/s390/zvector/autovec-fortran.h | 7 +
.../autovec-long-double-signaling-ge.c | 8 +
.../autovec-long-double-signaling-gt.c | 8 +
.../autovec-long-double-signaling-le.c | 8 +
.../autovec-long-double-signaling-lt.c | 8 +
.../gcc.target/s390/zvector/autovec.h | 41 +++
gcc/tree-eh.c | 8 +
gcc/tree-ssa-forwprop.c | 7 +-
70 files changed, 881 insertions(+), 153 deletions(-)
create mode 100644 gcc/testsuite/gcc.target/s390/zvector/autovec-double-quiet-eq.c
create mode 100644 gcc/testsuite/gcc.target/s390/zvector/autovec-double-quiet-ge.c
create mode 100644 gcc/testsuite/gcc.target/s390/zvector/autovec-double-quiet-gt.c
create mode 100644 gcc/testsuite/gcc.target/s390/zvector/autovec-double-quiet-le.c
create mode 100644 gcc/testsuite/gcc.target/s390/zvector/autovec-double-quiet-lt.c
create mode 100644 gcc/testsuite/gcc.target/s390/zvector/autovec-double-quiet-ordered.c
create mode 100644 gcc/testsuite/gcc.target/s390/zvector/autovec-double-quiet-uneq.c
create mode 100644 gcc/testsuite/gcc.target/s390/zvector/autovec-double-quiet-unordered.c
create mode 100644 gcc/testsuite/gcc.target/s390/zvector/autovec-double-signaling-eq-z13-finite.c
create mode 100644 gcc/testsuite/gcc.target/s390/zvector/autovec-double-signaling-eq-z13.c
create mode 100644 gcc/testsuite/gcc.target/s390/zvector/autovec-double-signaling-eq.c
create mode 100644 gcc/testsuite/gcc.target/s390/zvector/autovec-double-signaling-ge-z13-finite.c
create mode 100644 gcc/testsuite/gcc.target/s390/zvector/autovec-double-signaling-ge-z13.c
create mode 100644 gcc/testsuite/gcc.target/s390/zvector/autovec-double-signaling-ge.c
create mode 100644 gcc/testsuite/gcc.target/s390/zvector/autovec-double-signaling-gt-z13-finite.c
create mode 100644 gcc/testsuite/gcc.target/s390/zvector/autovec-double-signaling-gt-z13.c
create mode 100644 gcc/testsuite/gcc.target/s390/zvector/autovec-double-signaling-gt.c
create mode 100644 gcc/testsuite/gcc.target/s390/zvector/autovec-double-signaling-le-z13-finite.c
create mode 100644 gcc/testsuite/gcc.target/s390/zvector/autovec-double-signaling-le-z13.c
create mode 100644 gcc/testsuite/gcc.target/s390/zvector/autovec-double-signaling-le.c
create mode 100644 gcc/testsuite/gcc.target/s390/zvector/autovec-double-signaling-lt-z13-finite.c
create mode 100644 gcc/testsuite/gcc.target/s390/zvector/autovec-double-signaling-lt-z13.c
create mode 100644 gcc/testsuite/gcc.target/s390/zvector/autovec-double-signaling-lt.c
create mode 100644 gcc/testsuite/gcc.target/s390/zvector/autovec-double-signaling-ltgt-z13-finite.c
create mode 100644 gcc/testsuite/gcc.target/s390/zvector/autovec-double-signaling-ltgt-z13.c
create mode 100644 gcc/testsuite/gcc.target/s390/zvector/autovec-double-signaling-ltgt.c
create mode 100644 gcc/testsuite/gcc.target/s390/zvector/autovec-double-smax-z13.F90
create mode 100644 gcc/testsuite/gcc.target/s390/zvector/autovec-double-smax.F90
create mode 100644 gcc/testsuite/gcc.target/s390/zvector/autovec-double-smin-z13.F90
create mode 100644 gcc/testsuite/gcc.target/s390/zvector/autovec-double-smin.F90
create mode 100644 gcc/testsuite/gcc.target/s390/zvector/autovec-float-quiet-eq.c
create mode 100644 gcc/testsuite/gcc.target/s390/zvector/autovec-float-quiet-ge.c
create mode 100644 gcc/testsuite/gcc.target/s390/zvector/autovec-float-quiet-gt.c
create mode 100644 gcc/testsuite/gcc.target/s390/zvector/autovec-float-quiet-le.c
create mode 100644 gcc/testsuite/gcc.target/s390/zvector/autovec-float-quiet-lt.c
create mode 100644 gcc/testsuite/gcc.target/s390/zvector/autovec-float-quiet-ordered.c
create mode 100644 gcc/testsuite/gcc.target/s390/zvector/autovec-float-quiet-uneq.c
create mode 100644 gcc/testsuite/gcc.target/s390/zvector/autovec-float-quiet-unordered.c
create mode 100644 gcc/testsuite/gcc.target/s390/zvector/autovec-float-signaling-eq.c
create mode 100644 gcc/testsuite/gcc.target/s390/zvector/autovec-float-signaling-ge.c
create mode 100644 gcc/testsuite/gcc.target/s390/zvector/autovec-float-signaling-gt.c
create mode 100644 gcc/testsuite/gcc.target/s390/zvector/autovec-float-signaling-le.c
create mode 100644 gcc/testsuite/gcc.target/s390/zvector/autovec-float-signaling-lt.c
create mode 100644 gcc/testsuite/gcc.target/s390/zvector/autovec-float-signaling-ltgt.c
create mode 100644 gcc/testsuite/gcc.target/s390/zvector/autovec-fortran.h
create mode 100644 gcc/testsuite/gcc.target/s390/zvector/autovec-long-double-signaling-ge.c
create mode 100644 gcc/testsuite/gcc.target/s390/zvector/autovec-long-double-signaling-gt.c
create mode 100644 gcc/testsuite/gcc.target/s390/zvector/autovec-long-double-signaling-le.c
create mode 100644 gcc/testsuite/gcc.target/s390/zvector/autovec-long-double-signaling-lt.c
create mode 100644 gcc/testsuite/gcc.target/s390/zvector/autovec.h
--
2.23.0