[Bug bootstrap/82916] [8 regression] gcc miscompiled during stagefeedback (PGO bootstrap)

rguenth at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Nov 10 07:47:00 GMT 2017


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82916

--- Comment #8 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #7)
> Created attachment 42567 [details]
> gcc8-pr82916.patch
> 
> Untested fix.

As you figured ref_maybe_used_by_stmt and stmt_clobbers_ref_p are supposed
to be read-write dependence checks.

Note you may not use stmt_clobbers_ref_p to ask whether to re-order

  ... = read;
  write = ...;

you'd have to use refs_anti_dependent_p.

The fix looks correct but as noted above you might want to audit the checks
for the possibility of the case anti-dependence checks lurking (which wouldn't
be handled correctly either).


More information about the Gcc-bugs mailing list