re PR target/59652 (ICE: in reload_cse_simplify_operands, at postreload.c:411)
authorJohn David Anglin <danglin@gcc.gnu.org>
Wed, 8 Jan 2014 01:58:35 +0000 (01:58 +0000)
committerJohn David Anglin <danglin@gcc.gnu.org>
Wed, 8 Jan 2014 01:58:35 +0000 (01:58 +0000)
PR target/59652
* config/pa/pa.c (pa_legitimate_address_p): Return false before reload
for 14-bit register offsets when INT14_OK_STRICT is false.

From-SVN: r206413

gcc/ChangeLog
gcc/config/pa/pa.c

index c985377..b04be2d 100644 (file)
@@ -1,3 +1,9 @@
+2014-01-07  John David Anglin  <danglin@gcc.gnu.org>
+
+       PR target/59652
+       * config/pa/pa.c (pa_legitimate_address_p): Return false before reload
+       for 14-bit register offsets when INT14_OK_STRICT is false.
+
 2014-01-07  Roland Stigge  <stigge@antcom.de>
            Michael Meissner  <meissner@linux.vnet.ibm.com>
 
index 2c4f6bf..c3755bf 100644 (file)
@@ -10424,13 +10424,13 @@ pa_legitimate_address_p (enum machine_mode mode, rtx x, bool strict)
 
          /* When INT14_OK_STRICT is false, a secondary reload is needed
             to adjust the displacement of SImode and DImode floating point
-            instructions.  So, we return false when STRICT is true.  We
+            instructions but this may fail when the register also needs
+            reloading.  So, we return false when STRICT is true.  We
             also reject long displacements for float mode addresses since
             the majority of accesses will use floating point instructions
             that don't support 14-bit offsets.  */
          if (!INT14_OK_STRICT
-             && reload_in_progress
-             && strict
+             && (strict || !(reload_in_progress || reload_completed))
              && mode != QImode
              && mode != HImode)
            return false;
@@ -10490,8 +10490,7 @@ pa_legitimate_address_p (enum machine_mode mode, rtx x, bool strict)
            return true;
 
          if (!INT14_OK_STRICT
-             && reload_in_progress
-             && strict
+             && (strict || !(reload_in_progress || reload_completed))
              && mode != QImode
              && mode != HImode)
            return false;