aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1994-05-16 16:21:39 -0400
committerRichard Kenner <kenner@gcc.gnu.org>1994-05-16 16:21:39 -0400
commit89861c38672f0615c9c2c104327a428fb6a997f6 (patch)
tree5f2d31d057112eec91a33ab653472ae31119150b
parent4ac0968744362763aa58b43608edb0c7997cb35b (diff)
downloadgcc-89861c38672f0615c9c2c104327a428fb6a997f6.zip
gcc-89861c38672f0615c9c2c104327a428fb6a997f6.tar.gz
gcc-89861c38672f0615c9c2c104327a428fb6a997f6.tar.bz2
(try_pre_increment_1): Don't try to create a pre-increment expression
if the register dies in the succeeding insn. From-SVN: r7308
-rw-r--r--gcc/flow.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/flow.c b/gcc/flow.c
index 71d15ad..448608c 100644
--- a/gcc/flow.c
+++ b/gcc/flow.c
@@ -2516,6 +2516,9 @@ try_pre_increment_1 (insn)
rtx y = reg_next_use[regno];
if (y != 0
&& BLOCK_NUM (y) == BLOCK_NUM (insn)
+ /* Don't do this if the reg dies, or gets set in y; a standard addressing
+ mode would be better. */
+ && ! dead_or_set_p (y, SET_DEST (x))
&& try_pre_increment (y, SET_DEST (PATTERN (insn)),
amount))
{