This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH, S390] Avoid LA with base and index on z13
- From: "Ulrich Weigand" <uweigand at de dot ibm dot com>
- To: rdapp at linux dot ibm dot com (Robin Dapp)
- Cc: gcc-patches at gcc dot gnu dot org (GCC Patches), krebbel at linux dot ibm dot com (Andreas Krebbel)
- Date: Thu, 5 Jul 2018 13:51:11 +0200 (CEST)
- Subject: Re: [PATCH, S390] Avoid LA with base and index on z13
Robin Dapp wrote:
> * config/s390/s390.c (preferred_la_operand_p): Do not use
> LA with base and index on z13 or later.
The code just before your change reads:
/* Avoid LA instructions with index register on z196; it is
preferable to use regular add instructions when possible.
Starting with zEC12 the la with index register is "uncracked"
if (addr.indx && s390_tune == PROCESSOR_2817_Z196)
But on zEC12 LA works pretty much the same as on z13/z14, it is
indeed not cracked, but still a 2-cycle instruction when using
an index register. So I guess the change really should apply
to zEC12 as well, and this could be as simple as changing the
above line to:
if (addr.indx && s390_tune >= PROCESSOR_2817_Z196)
(Note that "addr.base && addr.indx" is the same as just checking
for addr.indx, since s390_decompose_address will never fill in
*just* an index.)
Dr. Ulrich Weigand
GNU/Linux compilers and toolchain