https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96897
Gabriel Ravier <gabravier at gmail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Failure to optimize |Failure to optimize sub+not |not+not+dec+and+not to |involving constant to add |add+or | --- Comment #2 from Gabriel Ravier <gabravier at gmail dot com> --- Better test case (I'd assume) : int f(int x) { return ~(constant - x); } which should be optimizable to `x + ~constant`.