From: Robin Dapp Date: Tue, 17 Jul 2018 12:08:06 +0000 (+0000) Subject: S/390: Do not use LA with index register on z196 or newer. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5211d26a2663bfb88992102952e809bd3da7e274;p=gcc.git S/390: Do not use LA with index register on z196 or newer. gcc/ChangeLog: 2018-07-17 Robin Dapp * config/s390/s390.c (preferred_la_operand_p): Do not use LA with index register on z196 or later. From-SVN: r262818 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2e04a56a342..53c4d24134a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2018-07-17 Robin Dapp + + * config/s390/s390.c (preferred_la_operand_p): Do not use LA with + index register on z196 or later. + 2018-07-17 Robin Dapp * config/s390/s390.c (s390_default_align): Set default function diff --git a/gcc/config/s390/s390.c b/gcc/config/s390/s390.c index 81f1fbaf894..60afe418483 100644 --- a/gcc/config/s390/s390.c +++ b/gcc/config/s390/s390.c @@ -4623,11 +4623,11 @@ preferred_la_operand_p (rtx op1, rtx op2) if (addr.indx && !REGNO_OK_FOR_INDEX_P (REGNO (addr.indx))) return false; - /* 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" - again. */ - if (addr.indx && s390_tune == PROCESSOR_2817_Z196) + /* Avoid LA instructions with index (and base) register on z196 or + later; it is preferable to use regular add instructions when + possible. Starting with zEC12 the la with index register is + "uncracked" again but still slower than a regular add. */ + if (addr.indx && s390_tune >= PROCESSOR_2817_Z196) return false; if (!TARGET_64BIT && !addr.pointer)