This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/67962] Optimization opportunity with conditional swap to two MIN/MAX in phiopt
- From: "pinskia at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 30 Aug 2016 06:17:48 +0000
- Subject: [Bug tree-optimization/67962] Optimization opportunity with conditional swap to two MIN/MAX in phiopt
- Auto-submitted: auto-generated
- References: <bug-67962-4@http.gcc.gnu.org/bugzilla/>
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);
}