From: Philip Blundell Date: Fri, 12 Mar 2004 20:10:06 +0000 (+0000) Subject: re PR target/10730 ([arm] -O2 generates invalid asm) X-Git-Tag: releases/gcc-3.3.4~175 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=95cbc4964b81b5296650675801192358b05f0e70;p=thirdparty%2Fgcc.git re PR target/10730 ([arm] -O2 generates invalid asm) 2004-03-12 Philip Blundell PR target/10730 Backport from trunk: 2003-05-15 Philip Blundell * config/arm/arm.c (adjacent_mem_locations): Reject offsets involving invalid constants. From-SVN: r79405 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 7561fcd3d70e..41e9e8128528 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2004-03-12 Philip Blundell + + PR target/10730 + Backport from trunk: + 2003-05-15 Philip Blundell + * config/arm/arm.c (adjacent_mem_locations): Reject offsets + involving invalid constants. + 2004-03-12 Philip Blundell PR target/14558 diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index 7422f1d03aff..1efadc61db05 100644 --- a/gcc/config/arm/arm.c +++ b/gcc/config/arm/arm.c @@ -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;