public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH 0/9] S/390 rework shift count handling
@ 2016-01-14 16:34 Andreas Krebbel
  2016-01-14 16:36 ` [PATCH 2/9] S/390: Add disabled insn attribute Andreas Krebbel
                   ` (10 more replies)
  0 siblings, 11 replies; 30+ messages in thread
From: Andreas Krebbel @ 2016-01-14 16:34 UTC (permalink / raw)
  To: gcc-patches

On S/390 we have address style shift counts.  So it is possible to
have a reg + const_int shift count.  To address this it appeared to be
convenient to really handle this as address operand.  For that reason
the "Y" constraint used for shift counts is an extra memory
constraint.  Unfortunately a shift count is not necessarily Pmode.  So
even when compiling for 64 bit we had to allow SImode addresses for Y.
Since all extra memory constraints go through s390_decompose_address
we had to unconditionally enable SImode addresses everywhere:

https://gcc.gnu.org/ml/gcc-patches/2006-03/msg01495.html

Unfortunately this seems to cause some trouble in situations not
entirely clear to me yet:

https://gcc.gnu.org/ml/gcc/2015-05/msg00305.html

This patchset fixes this by getting rid of SImode - "Y" combinations
in our machine description.  To prevent us from losing performance in
situations where an reg + const_int can really be used as shift count
we have to make it explicit in the RTL patterns.  This unfortunately
requires us to duplicate a lot of patterns.  To compensate for that
I'm using the define_subst mechanism to keep the overhead limited.  In
fact the patchset reduces the number of lines in the md files.

I've tested the whole patchset with various CPU levels on s390 and
s390x.  No regressions.

Patch 1 is the only common code change which fixes a problem with the
renumbering of operands when performing substitutions.

While I only need a formal approval for patch 1 comments regarding the
other patches are welcome as well.

Ok to apply?

Bye,

-Andreas-

Andreas Krebbel (9):
  gensupport: Fix define_subst operand renumbering.
  S/390: Add disabled insn attribute
  S/390: Get rid of Y constraint in rotate patterns.
  S/390: Get rid of Y constraint in left and logical right shift
    patterns.
  S/390: Get rid of Y constraint in arithmetic right shift patterns.
  S/390: Get rid of Y constraint in tabort.
  S/390: Get rid of Y constraint in vector.md.
  S/390: Use define_subst for the setmem patterns.
  S/390: Disallow SImode in s390_decompose_address

 gcc/config/s390/predicates.md |  31 +++
 gcc/config/s390/s390.c        |   8 +-
 gcc/config/s390/s390.md       | 581 +++++++++++++++---------------------------
 gcc/config/s390/subst.md      | 180 +++++++++++++
 gcc/config/s390/vector.md     | 138 +++++-----
 gcc/gensupport.c              |  41 +--
 6 files changed, 520 insertions(+), 459 deletions(-)
 create mode 100644 gcc/config/s390/subst.md

-- 
1.9.1

^ permalink raw reply	[flat|nested] 30+ messages in thread
* [PATCH 0/9] S/390 rework shift count handling - v2
@ 2016-02-23 14:33 Andreas Krebbel
  2016-02-23 14:33 ` [PATCH 5/9] S/390: Get rid of Y constraint in arithmetic right shift patterns Andreas Krebbel
  0 siblings, 1 reply; 30+ messages in thread
From: Andreas Krebbel @ 2016-02-23 14:33 UTC (permalink / raw)
  To: gcc-patches

This is an updated version of the shift count rework in the S/390
backend.  I think I've addressed most of the feedback from Ulrich and
Bernd (gensupport patch).

https://gcc.gnu.org/ml/gcc-patches/2016-01/msg00940.html

Andreas Krebbel (9):
  gensupport: Fix define_subst operand renumbering.
  S/390: Use enabled attribute overrides to disable alternatives.
  S/390: Get rid of Y constraint in rotate patterns.
  S/390: Get rid of Y constraint in left and logical right shift
    patterns.
  S/390: Get rid of Y constraint in arithmetic right shift patterns.
  S/390: Get rid of Y constraint in tabort.
  S/390: Get rid of Y constraint in vector.md.
  S/390: Use define_subst for the setmem patterns.
  S/390: Disallow SImode in s390_decompose_address

 gcc/config/s390/predicates.md |  10 +
 gcc/config/s390/s390.c        |  31 ++-
 gcc/config/s390/s390.md       | 553 +++++++++++++++---------------------------
 gcc/config/s390/subst.md      | 154 ++++++++++++
 gcc/config/s390/vector.md     | 138 ++++++-----
 gcc/gensupport.c              |  45 ++--
 6 files changed, 478 insertions(+), 453 deletions(-)
 create mode 100644 gcc/config/s390/subst.md

-- 
1.9.1

^ permalink raw reply	[flat|nested] 30+ messages in thread
* [PATCH 0/9] S/390 rework shift count handling - v3
@ 2016-02-29  8:47 Andreas Krebbel
  2016-02-29  8:47 ` [PATCH 5/9] S/390: Get rid of Y constraint in arithmetic right shift patterns Andreas Krebbel
  0 siblings, 1 reply; 30+ messages in thread
From: Andreas Krebbel @ 2016-02-29  8:47 UTC (permalink / raw)
  To: gcc-patches; +Cc: uweigand

here is an updated version of the shift count rework in the S/390
backend.

Bootstrapped and regtested on s390 and s390x --with-arch=z196,zEC12,z13

Changes:

- Merge the address reg and immediate alternatives as suggested in:
  https://gcc.gnu.org/ml/gcc-patches/2016-02/msg01744.html

- Add constraints (jm6 and jm8) equivalent to the
  const_int_6bitset_operand and const_int_8bitset_operand predicates.

Andreas Krebbel (9):
  gensupport: Fix define_subst operand renumbering.
  S/390: Use enabled attribute overrides to disable alternatives.
  S/390: Get rid of Y constraint in rotate patterns.
  S/390: Get rid of Y constraint in left and logical right shift
    patterns.
  S/390: Get rid of Y constraint in arithmetic right shift patterns.
  S/390: Get rid of Y constraint in tabort.
  S/390: Get rid of Y constraint in vector.md.
  S/390: Use define_subst for the setmem patterns.
  S/390: Disallow SImode in s390_decompose_address

 gcc/config/s390/constraints.md |   9 +
 gcc/config/s390/predicates.md  |  10 +
 gcc/config/s390/s390.c         |  31 ++-
 gcc/config/s390/s390.md        | 530 ++++++++++++++---------------------------
 gcc/config/s390/subst.md       | 147 ++++++++++++
 gcc/config/s390/vector.md      | 127 +++++-----
 gcc/gensupport.c               |  45 ++--
 7 files changed, 453 insertions(+), 446 deletions(-)
 create mode 100644 gcc/config/s390/subst.md

-- 
1.9.1

^ permalink raw reply	[flat|nested] 30+ messages in thread

end of thread, other threads:[~2016-02-29  8:47 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-14 16:34 [PATCH 0/9] S/390 rework shift count handling Andreas Krebbel
2016-01-14 16:36 ` [PATCH 2/9] S/390: Add disabled insn attribute Andreas Krebbel
2016-02-01 13:45   ` Ulrich Weigand
2016-02-01 17:14     ` Andreas Krebbel
2016-02-01 17:22       ` Ulrich Weigand
2016-01-14 16:36 ` [PATCH 3/9] S/390: Get rid of Y constraint in rotate patterns Andreas Krebbel
2016-02-01 13:30   ` Ulrich Weigand
2016-02-01 16:47     ` Andreas Krebbel
2016-02-01 16:58       ` Ulrich Weigand
2016-02-01 17:04         ` Andreas Krebbel
2016-02-01 17:11           ` Ulrich Weigand
2016-01-14 16:38 ` [PATCH 5/9] S/390: Get rid of Y constraint in arithmetic right shift patterns Andreas Krebbel
2016-02-01 13:35   ` Ulrich Weigand
2016-02-23 14:25     ` Andreas Krebbel
2016-01-14 16:39 ` [PATCH 6/9] S/390: Get rid of Y constraint in tabort Andreas Krebbel
2016-02-01 13:36   ` Ulrich Weigand
2016-02-23 14:28     ` Andreas Krebbel
2016-01-14 16:40 ` [PATCH 7/9] S/390: Get rid of Y constraint in vector.md Andreas Krebbel
2016-02-01 13:38   ` Ulrich Weigand
2016-01-14 16:41 ` [PATCH 9/9] S/390: Disallow SImode in s390_decompose_address Andreas Krebbel
2016-02-01 13:46   ` Ulrich Weigand
2016-01-14 16:44 ` [PATCH 1/9] gensupport: Fix define_subst operand renumbering Andreas Krebbel
2016-01-18 14:46   ` Bernd Schmidt
2016-01-14 19:33 ` [PATCH 4/9] S/390: Get rid of Y constraint in left and logical right shift patterns Andreas Krebbel
2016-01-14 19:33 ` [PATCH 8/9] S/390: Use define_subst for the setmem patterns Andreas Krebbel
2016-02-01 13:43   ` Ulrich Weigand
2016-01-14 20:44 ` Andreas Krebbel
2016-01-14 21:06 ` [PATCH 4/9] S/390: Get rid of Y constraint in left and logical right shift patterns Andreas Krebbel
2016-02-23 14:33 [PATCH 0/9] S/390 rework shift count handling - v2 Andreas Krebbel
2016-02-23 14:33 ` [PATCH 5/9] S/390: Get rid of Y constraint in arithmetic right shift patterns Andreas Krebbel
2016-02-29  8:47 [PATCH 0/9] S/390 rework shift count handling - v3 Andreas Krebbel
2016-02-29  8:47 ` [PATCH 5/9] S/390: Get rid of Y constraint in arithmetic right shift patterns Andreas Krebbel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).