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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P2

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
(a + 1) + (b - 1) might be no longer considered safe to simplify to a + b
for overflow reasons.  I think fold-const has special cases for this
in associate_trees and friends that handles the case where parts of the
re-associated sums cancel but we did not add all of those to match.pd
and the reassoc pass doesn't handle expressions invoking undefined behavior
at all.

So yes, FRE relies on match.pd catching this simplification.

Reply via email to