S/390: Rework shift count handling.
authorRobin Dapp <rdapp@linux.ibm.com>
Mon, 8 Jul 2019 14:40:48 +0000 (14:40 +0000)
committerRobin Dapp <rdapp@gcc.gnu.org>
Mon, 8 Jul 2019 14:40:48 +0000 (14:40 +0000)
commite2839e47894f0b4917ddbd59013071e98f525336
tree5f0d0cb4e462dfba33273ddc206a817fadcb9e68
parentf069f0f20fb7a8467cb0dd6f01575e9c56aa8bc2
S/390: Rework shift count handling.

Add s390_valid_shift_count to determine the validity of a
shift-count operand.  This is used to replace increasingly
complex substitutions that should have allowed address-style
shift-count handling, an and mask as well as no-op subregs
on the operand.

gcc/ChangeLog:

2019-07-08  Robin Dapp  <rdapp@linux.ibm.com>

        * config/s390/constraints.md: Add new jsc constraint.
        * config/s390/predicates.md: New predicates.
        * config/s390/s390-protos.h (s390_valid_shift_count): New function.
        * config/s390/s390.c (s390_valid_shift_count): New function.
        (print_shift_count_operand): Use s390_valid_shift_count.
        (print_operand): Likewise.
        * config/s390/s390.md: Use new predicate.
        * config/s390/subst.md: Remove addr_style_op and masked_op substs.
        * config/s390/vector.md: Use new predicate.

2019-07-08  Robin Dapp  <rdapp@linux.ibm.com>

        * gcc.target/s390/combine-rotate-modulo.c: New test.
        * gcc.target/s390/combine-shift-rotate-add-mod.c: New test.
        * gcc.target/s390/vector/combine-shift-vec.c: New test.

From-SVN: r273236
12 files changed:
gcc/ChangeLog
gcc/config/s390/constraints.md
gcc/config/s390/predicates.md
gcc/config/s390/s390-protos.h
gcc/config/s390/s390.c
gcc/config/s390/s390.md
gcc/config/s390/subst.md
gcc/config/s390/vector.md
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/s390/combine-rotate-modulo.c [new file with mode: 0644]
gcc/testsuite/gcc.target/s390/combine-shift-rotate-add-mod.c [new file with mode: 0644]
gcc/testsuite/gcc.target/s390/vector/combine-shift-vec.c [new file with mode: 0644]