[Bug tree-optimization/71558] missed optimization for type short, char and floating point types
glisse at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Jun 16 17:01:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71558
Marc Glisse <glisse at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |missed-optimization
--- Comment #1 from Marc Glisse <glisse at gcc dot gnu.org> ---
tree-ssa-phiopt.c:
/* Now optimize (x != 0) ? x + y : y to just y.
The following condition is too restrictive, there can easily be another
stmt in middle_bb, for instance a CONVERT_EXPR for the second argument.
*/
Indeed, here there are 3 NOP conversions (each argument is cast to the
corresponding unsigned type, and the result is cast back).
More information about the Gcc-bugs
mailing list