[Bug tree-optimization/51783] Missed optimization for X ==/!= (signed type) ((unsigned type) Y + Z)

ktietz at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Sat Jan 7 19:04:00 GMT 2012


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51783

--- Comment #4 from Kai Tietz <ktietz at gcc dot gnu.org> 2012-01-07 19:04:13 UTC ---
Hmm, here I disagree.  See other ==/!= comparison missed optimization.

Eg for 'x == (signed type)((unsigned type) x + z)' the transformation is
profitable, as it allows later on reduction in comparison.
This transformation leads to 'x == x + (int) z', which can be later on
transformed to 'z == 0'.



More information about the Gcc-bugs mailing list