]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
hppa: Don't canonicalize operand order of scaled index addresses
authorJohn David Anglin <danglin@gcc.gnu.org>
Mon, 9 Sep 2024 14:23:00 +0000 (10:23 -0400)
committerJohn David Anglin <danglin@gcc.gnu.org>
Mon, 9 Sep 2024 14:23:00 +0000 (10:23 -0400)
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.

gcc/config/pa/pa.cc

index 631f18a0ef514897cabda6654c6f8c992fec0cb3..84aa4f1b1f2a963c742b0b5a2eb032ee56d8f1c0 100644 (file)
@@ -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)