S/390: arch13: Support new bit operations
authorAndreas Krebbel <krebbel@linux.ibm.com>
Tue, 2 Apr 2019 10:51:53 +0000 (10:51 +0000)
committerAndreas Krebbel <krebbel@gcc.gnu.org>
Tue, 2 Apr 2019 10:51:53 +0000 (10:51 +0000)
commit4a9733f3dfbd016103a30151a9656ffb63dce6e4
tree3915594697fee71d7c670df57d74b87c2b375e97
parent511ea1538b58d7d44a53d0264fc041de5991270a
S/390: arch13: Support new bit operations

Make use of the new bit operation instructions when generating code
for the arch13 level.

gcc/ChangeLog:

2019-04-02  Andreas Krebbel  <krebbel@linux.ibm.com>

* config/s390/s390.c (s390_canonicalize_comparison): Convert
certain compares for arch13 in order to make use of the condition
code result produced by the new instructions.
(s390_rtx_costs): Adjust the costs for nnrk, nngrk, nork, nogrk,
nxrk, and nxgrk instruction patterns.
* config/s390/s390.md (ANDOR, bitops_name, inv_bitops_name)
(inv_no): Add new code iterator together with some attributes.
("*andc_split_<mode>"): Disable splitter for arch13.
("*<ANDOR:bitops_name>c<GPR:mode>_cc")
("*<ANDOR:bitops_name>c<GPR:mode>_cconly")
("*<ANDOR:bitops_name>c<GPR:mode>")
("*n<ANDOR:inv_bitops_name><GPR:mode>_cc")
("*n<ANDOR:inv_bitops_name><mode>_cconly")
("*n<ANDOR:inv_bitops_name><mode>", "*nxor<GPR:mode>_cc")
("*nxor<mode>_cconly", "*nxor<mode>"): New insn definitions.

gcc/testsuite/ChangeLog:

2019-04-02  Andreas Krebbel  <krebbel@linux.ibm.com>

* gcc.target/s390/arch13/bitops-1.c: New test.
* gcc.target/s390/arch13/bitops-2.c: New test.
* gcc.target/s390/md/andc-splitter-1.c: Add -march=z14 build
option and adjust line numbers.
* gcc.target/s390/md/andc-splitter-2.c: Likewise.

From-SVN: r270078
gcc/ChangeLog
gcc/config/s390/s390.c
gcc/config/s390/s390.md
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/s390/arch13/bitops-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/s390/arch13/bitops-2.c [new file with mode: 0644]
gcc/testsuite/gcc.target/s390/md/andc-splitter-1.c
gcc/testsuite/gcc.target/s390/md/andc-splitter-2.c