Matching it to movdi_larl improves the code, eliminating one
instruction and the literal pool entry:
larl %r1,.LANCHOR0+8
stgrl %r1,.LANCHOR0
br %r14
Taking it one step further, there is no reason to keep movdi_64 and
movdi_larl separate, since this could potentially improve code in other
ways by giving lra one more alternative to choose from.
gcc/ChangeLog:
2018-10-25 Ilya Leoshkevich <iii@linux.ibm.com>
* config/s390/constraints.md (ZL): New constraint.
* config/s390/s390.c (legitimate_pic_operand_p): Accept LARL
operands.
* config/s390/s390.md (movdi_larl): Remove.
(movdi_64): Add the LARL alternative.
gcc/testsuite/ChangeLog:
2018-10-25 Ilya Leoshkevich <iii@linux.ibm.com>
* gcc.target/s390/global-array-almost-huge-element.c: New test.
* gcc.target/s390/global-array-almost-negative-huge-element.c: New test.
* gcc.target/s390/global-array-element-pic.c: New test.
* gcc.target/s390/global-array-even-element.c: New test.
* gcc.target/s390/global-array-huge-element.c: New test.
* gcc.target/s390/global-array-negative-huge-element.c: New test.
* gcc.target/s390/global-array-odd-element.c: New test.