diff options
author | Ilya Leoshkevich <iii@linux.ibm.com> | 2018-10-22 08:21:03 +0000 |
---|---|---|
committer | Ilya Leoshkevich <iii@gcc.gnu.org> | 2018-10-22 08:21:03 +0000 |
commit | 3703b60c903e1cb7629c1a51cda68e53ebd8fbe8 (patch) | |
tree | d4a9054a3d48ec4254d08691d58fd33499335cc2 /gcc/tree-ssa-scopedtables.c | |
parent | a48be73babd27c9deabf099b7202643dd447c9dc (diff) | |
download | gcc-3703b60c903e1cb7629c1a51cda68e53ebd8fbe8.zip gcc-3703b60c903e1cb7629c1a51cda68e53ebd8fbe8.tar.gz gcc-3703b60c903e1cb7629c1a51cda68e53ebd8fbe8.tar.bz2 |
S/390: Make "b" constraint match literal pool references
Improves the code generation by getting rid of redundant LAs, as seen
in the following example:
- la %r1,0(%r13)
- lg %r4,0(%r1)
+ lg %r4,0(%r13)
Also allows to proceed with the merge of movdi_64 and movdi_larl.
Currently LRA decides to spill literal pool references back to the
literal pool, because it preliminarily chooses alternatives with
CT_MEMORY constraints without calling
satisfies_memory_constraint_p (). Later on it notices that the
constraint is wrong and fixes it by spilling. The constraint in this
case is "b", and the operand is a literal pool reference. There is
no reason to reject them. The current behavior was introduced,
apparently unintentionally, by
https://gcc.gnu.org/ml/gcc-patches/2010-09/msg00812.html
The patch affects a little bit more than mentioned in the subject,
because it changes s390_loadrelative_operand_p (), which is called not
only for checking the "b" constraint. However, the only caller for
which it should really not accept literal pool references is
s390_check_qrst_address (), so it was changed to explicitly do so.
gcc/ChangeLog:
2018-10-22 Ilya Leoshkevich <iii@linux.ibm.com>
* config/s390/s390.c (s390_loadrelative_operand_p): Accept
literal pool references.
(s390_check_qrst_address): Adapt to the new behavior of
s390_loadrelative_operand_p ().
gcc/testsuite/ChangeLog:
2018-10-22 Ilya Leoshkevich <iii@linux.ibm.com>
* gcc.target/s390/litpool-int.c: New test.
From-SVN: r265371
Diffstat (limited to 'gcc/tree-ssa-scopedtables.c')
0 files changed, 0 insertions, 0 deletions