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.