On Sat, 12 Dec 2020, Jakub Jelinek via Gcc-patches wrote:

This patch adds the ~(X - Y) -> ~X + Y simplification requested
in the PR (plus also ~(X + C) -> ~X + (-C) for constants C that can
be safely negated.

Would it have been wrong to produce ~X - C without caring about negating (and then extending it to non-constants)?

I wonder if this makes
/* ~(~X - Y) -> X + Y and ~(~X + Y) -> X - Y.  */
useless.

--
Marc Glisse

Reply via email to