PR35542 Fix fwprop only propagates one operand
hutchinsonandy@aim.com
hutchinsonandy@aim.com
Tue Mar 25 11:47:00 GMT 2008
Can this be approved and commiited please or inform me in the errors of
my ways?
Andy
-----Original Message-----
From: Andy H <hutchinsonandy@aim.com>
To: gcc-patches@gcc.gnu.org; Paolo Bonzini <bonzini@gnu.org>;
aoliva@redhat.com
Sent: Thu, 20 Mar 2008 5:23 pm
Subject: PR35542 Fix fwprop only propagates one operand
This patch fixes problem where incorrect comparison of RTL causes
fwprop to omit propagating registers if one propagation has already
modified the instruction.
I believe this is a regression as it seemed to have originated from DF
changes.
Further details are shown in
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35542
The attached copy is the same change listed in the PR updated against
todays HEAD.
The fix uses reg_mentioned_p which does not rely on exact equality of
LOC - as this will get changed by an earlier propagation.
This patch has been regression tested courtesy of Mike Stein:
the patch "http://gcc.gnu.org/bugzilla/attachment.cgi?id=15300" caused
0 regressions when applied against trunk, svn revision 133362 for the
target x86_64.
configure flags used for this regression test:
--enable-languages=all \
--disable-nls \
--enable-checking=yes,rtl,df,fold
A short test with linux-2.6.24 (make allmodconfig;make) showed no new
ICEs.
I have also tested this on AVR target under Cygwin with no regressions.
Please consider this for approval. My paperwork in on file with FSF.
Andy Hutchinson <hutchinsonamdy@aim.com>
* fwprop.c (forward_propagate_and_simplify): Replace
loc_reg_mentioned_in_p with reg_mentioned_p so that modified RTL
can be matched.
Index: fwprop.c
===================================================================
--- fwprop.c (revision 133399)
+++ fwprop.c (working copy)
@@ -932,7 +932,7 @@
else
parent = PATTERN (use_insn);
- if (!loc_mentioned_in_p (DF_REF_LOC (use), parent))
+ if (!reg_mentioned_p (DF_REF_REG (use), parent))
return;
def_insn = DF_REF_INSN (def);
More information about the Gcc-patches
mailing list