This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/70600] Missed tree optimization with multiple additions in different types.


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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |missed-optimization
                 CC|                            |pinskia at gcc dot gnu.org
           Severity|normal                      |enhancement

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
I have seen other cases which need to be handled by FRE/PRE instead of
reassiocate.

Even the simple:

int f(int a, int b, int d)
{
  unsigned a1 = a;
  unsigned b1 = b;
  unsigned c1 = a + b;
  int c = c1;
  if (d)
    c = a + b;
  return c;    
}

Note I think FRE handles the above incorrectly as it converts the safe unsigned
addition to non safe signed addition. I will file a different bug about that
issue.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]