[Bug target/67462] [6 Regression] FAIL: gcc.dg/ifcvt-3.c scan-rtl-dump ce1 "3 true changes made"

rguenth at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Sep 14 11:00:00 GMT 2015


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67462

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |6.0

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
The tree level should indeed do a better job here but it gets "confused" by
narrowing the return expressions to int before it gets a chance to do
that optimization.  It's

 s64 d = a - b;

  if (d == 0)
    return (unsigned)a + (unsigned)c;
  else
    return (unsigned)b + (unsigned)d + (unsigned)c;

to them and 'd' is not handled the same way because the shortening happens
in the frontend.

You might want to file a separate PR about this missed optimization.



More information about the Gcc-bugs mailing list