re PR target/10730 ([arm] -O2 generates invalid asm)
authorPhilip Blundell <philb@gnu.org>
Thu, 15 May 2003 18:13:41 +0000 (18:13 +0000)
committerPhil Blundell <pb@gcc.gnu.org>
Thu, 15 May 2003 18:13:41 +0000 (18:13 +0000)
2003-05-15  Philip Blundell  <philb@gnu.org>

PR target/10730
* config/arm/arm.c (adjacent_mem_locations): Reject offsets
involving invalid constants.

From-SVN: r66838

gcc/ChangeLog
gcc/config/arm/arm.c

index 2da0549d77b4e22032ccf1610e6589ca865cb639..772b5e0a50a80759f0dd369f570e57f13e5aba08 100644 (file)
@@ -1,3 +1,9 @@
+2003-05-15  Philip Blundell  <philb@gnu.org>
+
+       PR target/10730
+       * config/arm/arm.c (adjacent_mem_locations): Reject offsets
+       involving invalid constants.
+
 2003-05-15  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
 
        * pa.c (hppa_expand_prologue): Remove blockage.
index 500bd72ed7ce3e9fb7de1b51b86f7b50c0d3bdd3..d776766dc7f14333b3a6dd699777dbbd99ef9460 100644 (file)
@@ -4571,6 +4571,12 @@ adjacent_mem_locations (a, b)
       else
        reg1 = REGNO (XEXP (b, 0));
 
+      /* Don't accept any offset that will require multiple instructions to handle,
+        since this would cause the arith_adjacentmem pattern to output an overlong
+        sequence.  */
+      if (!const_ok_for_op (PLUS, val0) || !const_ok_for_op (PLUS, val1))
+       return 0;
+      
       return (reg0 == reg1) && ((val1 - val0) == 4 || (val0 - val1) == 4);
     }
   return 0;