On 08/05/2015 11:32 AM, Richard Sandiford wrote:
and I don't see how GCC could prove that eliminate_regs_1 doesn't
modify the value of recog_data.n_dups between the two loops.
eliminate_regs_1 calls functions like plus_constant that are defined
outside the TU and that certainly aren't pure/const.
Right. I should have been clearer. I don't think the reload1.c code is a false positive because we can't see into those functions to determine side effects.

So I think c#5 (marked as a bogus reduction) is an accurate reflection
of what reload1.c does.  c#4 looks like a genuine bug but seems different
from the reload1.c case.  If we still warn for c#4 then I think we
should keep the bugzilla entry open for that, but the warning for the
reload1.c code seems justified.
Right. I don't want to lose the false positive and associated missed jump threading in c#4.


 Perhaps the question is why it doesn't trigger on more targets :-)
Not sure. Could be how match_dup is used plus some interactions with SRA and BRANCH_COST and who knows what else :-0


Jeff

Reply via email to