S/390: Define shift_truncation_mask.
authorRobin Dapp <rdapp@linux.ibm.com>
Mon, 8 Jul 2019 14:42:49 +0000 (14:42 +0000)
committerRobin Dapp <rdapp@gcc.gnu.org>
Mon, 8 Jul 2019 14:42:49 +0000 (14:42 +0000)
commit5fad9d33e1dacbd754473e441f5e305ba7d3ef6c
tree9cefdcb9fd52e27cabd6c42c0b688464f71fbac0
parente2839e47894f0b4917ddbd59013071e98f525336
S/390: Define shift_truncation_mask.

Define s390_shift_truncation_mask to allow the optabs optimization

    sh = (64 - sh)
 -> sh = -sh

for a rotation operation.

gcc/ChangeLog:

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

* config/s390/s390.c (s390_shift_truncation_mask): Define.
(TARGET_SHIFT_TRUNCATION_MASK): Define.

gcc/testsuite/ChangeLog:

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

* gcc.target/s390/rotate-truncation-mask.c: New test.

From-SVN: r273237
gcc/ChangeLog
gcc/config/s390/s390.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/s390/rotate-truncation-mask.c [new file with mode: 0644]