summaryrefslogtreecommitdiff
path: root/gcc/combine.c
diff options
context:
space:
mode:
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>1997-01-29 20:25:29 +0000
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>1997-01-29 20:25:29 +0000
commit8671d9aed15a97371ed7ef13830bc29e5304fa28 (patch)
tree634937eb8340075f71bb99f73e363051caeb9524 /gcc/combine.c
parent2969de6be252acbcea2a27f178388d471b0b2dbe (diff)
downloadgcc-8671d9aed15a97371ed7ef13830bc29e5304fa28.tar.gz
Add a case where reg_n_refs is cleared
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@13561 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/combine.c')
-rw-r--r--gcc/combine.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/combine.c b/gcc/combine.c
index be5843b5629..a0f15b3672c 100644
--- a/gcc/combine.c
+++ b/gcc/combine.c
@@ -2355,7 +2355,9 @@ try_combine (i3, i2, i1)
/* If the reg formerly set in I2 died only once and that was in I3,
zero its use count so it won't make `reload' do any work. */
- if (! added_sets_2 && newi2pat == 0 && ! i2dest_in_i2src)
+ if (! added_sets_2
+ && (newi2pat == 0 || ! reg_mentioned_p (i2dest, newi2pat))
+ && ! i2dest_in_i2src)
{
regno = REGNO (i2dest);
reg_n_sets[regno]--;