aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Earnshaw <rearnsha@arm.com>2003-01-15 16:06:47 +0000
committerRichard Earnshaw <rearnsha@gcc.gnu.org>2003-01-15 16:06:47 +0000
commit89c4b810466abcea1ccf7861b627d72e3739345e (patch)
treec03a9ef5ffc689f4abb8e2a3be1aaaa700b19b42
parent3cd4577449f2e7af97026a85a3ccd81a27fa9101 (diff)
downloadgcc-89c4b810466abcea1ccf7861b627d72e3739345e.zip
gcc-89c4b810466abcea1ccf7861b627d72e3739345e.tar.gz
gcc-89c4b810466abcea1ccf7861b627d72e3739345e.tar.bz2
flow.c (find_auto_inc): Also try to generate a PRE_MODIFY with constant offset.
* flow.c (find_auto_inc): Also try to generate a PRE_MODIFY with constant offset. From-SVN: r61333
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/flow.c6
2 files changed, 11 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 282d718..e9c5d2c 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,10 @@
2003-01-15 Richard Earnshaw <rearnsha@arm.com>
+ * flow.c (find_auto_inc): Also try to generate a PRE_MODIFY with
+ constant offset.
+
+2003-01-15 Richard Earnshaw <rearnsha@arm.com>
+
* arm.h (HAVE_PRE_MODIFY_DISP, HAVE_PRE_MODIFY_REG): Define.
(HAVE_POST_MODIFY_DISP, HAVE_POST_MODIFY_REG): Define.
(ARM_GO_IF_LEGITIMATE_ADDRESS): Handle pre/post-modify addresses.
diff --git a/gcc/flow.c b/gcc/flow.c
index d543ba4..0d31076 100644
--- a/gcc/flow.c
+++ b/gcc/flow.c
@@ -3525,6 +3525,12 @@ find_auto_inc (pbi, x, insn)
addr,
inc_val)),
insn, x, incr, addr);
+ else if (HAVE_PRE_MODIFY_DISP && offset == INTVAL (inc_val))
+ attempt_auto_inc (pbi, gen_rtx_PRE_MODIFY (Pmode, addr,
+ gen_rtx_PLUS (Pmode,
+ addr,
+ inc_val)),
+ insn, x, incr, addr);
}
else if (GET_CODE (inc_val) == REG
&& ! reg_set_between_p (inc_val, PREV_INSN (insn),