diff options
author | Robin Dapp <rdapp@linux.ibm.com> | 2018-07-17 12:08:06 +0000 |
---|---|---|
committer | Robin Dapp <rdapp@gcc.gnu.org> | 2018-07-17 12:08:06 +0000 |
commit | 5211d26a2663bfb88992102952e809bd3da7e274 (patch) | |
tree | 640661b1c974e299438b33e8af4ae25d1f8a7486 | |
parent | 22800d6629dd7a9dde96276a3d93dabe236e2ea6 (diff) | |
download | gcc-5211d26a2663bfb88992102952e809bd3da7e274.zip gcc-5211d26a2663bfb88992102952e809bd3da7e274.tar.gz gcc-5211d26a2663bfb88992102952e809bd3da7e274.tar.bz2 |
S/390: Do not use LA with index register on z196 or newer.
gcc/ChangeLog:
2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
* config/s390/s390.c (preferred_la_operand_p): Do not use LA with
index register on z196 or later.
From-SVN: r262818
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/config/s390/s390.c | 10 |
2 files changed, 10 insertions, 5 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2e04a56..53c4d24 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,10 @@ 2018-07-17 Robin Dapp <rdapp@linux.ibm.com> + * config/s390/s390.c (preferred_la_operand_p): Do not use LA with + index register on z196 or later. + +2018-07-17 Robin Dapp <rdapp@linux.ibm.com> + * config/s390/s390.c (s390_default_align): Set default function alignment to 16. (s390_override_options_after_change): Call s390_default align. diff --git a/gcc/config/s390/s390.c b/gcc/config/s390/s390.c index 81f1fba..60afe41 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) |