aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJohn David Anglin <danglin@gcc.gnu.org>2024-09-09 10:23:00 -0400
committerJohn David Anglin <danglin@gcc.gnu.org>2024-09-09 10:23:00 -0400
commit8f3b402b6fca3e4b018e99f65bf22f478e888c16 (patch)
treeda64c24c1c5de9f1be15216df12e9f874a0dc5c4 /gcc
parente7d5b9aa021f6fc32810670b18ffabe543262775 (diff)
downloadgcc-8f3b402b6fca3e4b018e99f65bf22f478e888c16.zip
gcc-8f3b402b6fca3e4b018e99f65bf22f478e888c16.tar.gz
gcc-8f3b402b6fca3e4b018e99f65bf22f478e888c16.tar.bz2
hppa: Don't canonicalize operand order of scaled index addresses
pa_print_operand handles both operand orders for scaled index addresses, so it isn't necessary to canonicalize the order of operands. 2024-09-09 John David Anglin <danglin@gcc.gnu.org> gcc/ChangeLog: * config/pa/pa.cc (pa_legitimate_address_p): Don't canonicalize operand order of scaled index addresses.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/config/pa/pa.cc9
1 files changed, 4 insertions, 5 deletions
diff --git a/gcc/config/pa/pa.cc b/gcc/config/pa/pa.cc
index 631f18a..84aa4f1 100644
--- a/gcc/config/pa/pa.cc
+++ b/gcc/config/pa/pa.cc
@@ -11022,14 +11022,13 @@ pa_legitimate_address_p (machine_mode mode, rtx x, bool strict, code_helper)
return true;
if (!TARGET_DISABLE_INDEXING
- && GET_CODE (index) == MULT
/* Only accept base operands with the REG_POINTER flag prior to
reload on targets with non-equivalent space registers. */
&& (TARGET_NO_SPACE_REGS
- || (base == XEXP (x, 1)
- && (reload_completed
- || (reload_in_progress && HARD_REGISTER_P (base))
- || REG_POINTER (base))))
+ || reload_completed
+ || (reload_in_progress && HARD_REGISTER_P (base))
+ || REG_POINTER (base))
+ && GET_CODE (index) == MULT
&& REG_P (XEXP (index, 0))
&& GET_MODE (XEXP (index, 0)) == Pmode
&& MODE_OK_FOR_SCALED_INDEXING_P (mode)