This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/71558] missed optimization for type short, char and floating point types
- From: "glisse at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 16 Jun 2016 17:01:19 +0000
- Subject: [Bug tree-optimization/71558] missed optimization for type short, char and floating point types
- Auto-submitted: auto-generated
- References: <bug-71558-4 at http dot gcc dot gnu dot org/bugzilla/>
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).