IBM Z: Use llihf and oilf to load large immediates into GPRs
authorIlya Leoshkevich <iii@linux.ibm.com>
Thu, 26 Nov 2020 01:16:17 +0000 (02:16 +0100)
committerIlya Leoshkevich <iii@linux.ibm.com>
Wed, 2 Dec 2020 18:10:34 +0000 (19:10 +0100)
commit9776b4653bc4f8b568ea49fea4a7d7460e58b68a
tree1e8b52acac44cb703e3ac313aee0f255c0bcb810
parentcf4425558359e7a6b0ba4d953b85384e1c686260
IBM Z: Use llihf and oilf to load large immediates into GPRs

Currently GCC loads large immediates into GPRs from the literal pool,
which is not as efficient as loading two halves with llihf and oilf.

gcc/ChangeLog:

2020-11-30  Ilya Leoshkevich  <iii@linux.ibm.com>

* config/s390/s390-protos.h (s390_const_int_pool_entry_p): New
function.
* config/s390/s390.c (s390_const_int_pool_entry_p): New
function.
* config/s390/s390.md: Add define_peephole2 that produces llihf
and oilf.

gcc/testsuite/ChangeLog:

2020-11-30  Ilya Leoshkevich  <iii@linux.ibm.com>

* gcc.target/s390/load-imm64-1.c: New test.
* gcc.target/s390/load-imm64-2.c: New test.
gcc/config/s390/s390-protos.h
gcc/config/s390/s390.c
gcc/config/s390/s390.md
gcc/testsuite/gcc.target/s390/load-imm64-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/s390/load-imm64-2.c [new file with mode: 0644]