[Bug tree-optimization/67962] Optimization opportunity with conditional swap to two MIN/MAX in phiopt
pinskia at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Aug 30 06:18:00 GMT 2016
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);
}
More information about the Gcc-bugs
mailing list