]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR target/10730 ([arm] -O2 generates invalid asm)
authorPhilip Blundell <philb@gnu.org>
Fri, 12 Mar 2004 20:10:06 +0000 (20:10 +0000)
committerPhil Blundell <pb@gcc.gnu.org>
Fri, 12 Mar 2004 20:10:06 +0000 (20:10 +0000)
2004-03-12  Philip Blundell  <philb@gnu.org>

PR target/10730
Backport from trunk:
2003-05-15  Philip Blundell  <philb@gnu.org>
* config/arm/arm.c (adjacent_mem_locations): Reject offsets
involving invalid constants.

From-SVN: r79405

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

index 7561fcd3d70ecc5e4094661bddca9958f6ec0965..41e9e8128528d7f4a478e6579425d96ae3512cfd 100644 (file)
@@ -1,3 +1,11 @@
+2004-03-12  Philip Blundell  <philb@gnu.org>
+
+       PR target/10730
+       Backport from trunk:
+       2003-05-15  Philip Blundell  <philb@gnu.org>
+       * config/arm/arm.c (adjacent_mem_locations): Reject offsets
+       involving invalid constants.
 2004-03-12  Philip Blundell  <philb@gnu.org>
 
        PR target/14558
index 7422f1d03aff75337cb2b1bf61c161840dd78cfb..1efadc61db05e555e4b6ce3334a7775a01a03610 100644 (file)
@@ -3778,6 +3778,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;