2003-05-11 Philip Blundell * config/arm/arm.c (adjacent_mem_locations): Reject offsets involving invalid constants. [PR 10730] Index: config/arm/arm.c =================================================================== RCS file: /cvs/gcc/gcc/gcc/config/arm/arm.c,v retrieving revision 1.271 diff -u -p -r1.271 arm.c --- config/arm/arm.c 10 May 2003 13:10:46 -0000 1.271 +++ config/arm/arm.c 11 May 2003 12:30:31 -0000 @@ -4567,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_arm (val0) || !const_ok_for_arm (val1)) + return 0; + return (reg0 == reg1) && ((val1 - val0) == 4 || (val0 - val1) == 4); } return 0;