diff options
author | Ilya Leoshkevich <iii@linux.ibm.com> | 2018-10-25 14:23:31 +0000 |
---|---|---|
committer | Ilya Leoshkevich <iii@gcc.gnu.org> | 2018-10-25 14:23:31 +0000 |
commit | b6f517556c28d471237718e472f0c49fef99804d (patch) | |
tree | e6d3ba00618a1f516668784acf1579b0178d2e1b /gcc/tree-vect-data-refs.c | |
parent | 4dd7c0dcd87c86aad3d2cd45a08798eb445a9d3c (diff) | |
download | gcc-b6f517556c28d471237718e472f0c49fef99804d.zip gcc-b6f517556c28d471237718e472f0c49fef99804d.tar.gz gcc-b6f517556c28d471237718e472f0c49fef99804d.tar.bz2 |
S/390: Merge movdi_larl into movdi_64
Consider the following RTL:
(insn (set (mem/f/c:DI (reg/f:DI 60))
(const:DI (plus:DI (symbol_ref:DI ("*.LANCHOR0"))
(const_int 8)))))
generated by cse2 pass. It is matched to movdi_64, resulting in
the following inefficient code:
larl %r5,.L6 # Load literal pool@
lg %r1,.L7-.L6(%r5) # Load .LANCHOR0+8
stgrl %r1,.LANCHOR0
br %r14
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.
From-SVN: r265490
Diffstat (limited to 'gcc/tree-vect-data-refs.c')
0 files changed, 0 insertions, 0 deletions