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/67962] Optimization opportunity with conditional swap to two MIN/MAX in phiopt


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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|2015-10-14 00:00:00         |2016-8-29

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Just for completeness here is the C testcase (std::swap converted below):

int g(int x, int y);
static inline void swap(int *x, int *y)
{
  int t = *x;
  *x = *y;
  *y = t;
}
int f(int x, int y)
{
  if (y < x)
    {
        swap(&x, &y);
    }
  return g(x, y);
}

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