This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/59424] Optimization issue on min/max
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 14 Mar 2016 13:34:20 +0000
- Subject: [Bug c/59424] Optimization issue on min/max
- Auto-submitted: auto-generated
- References: <bug-59424-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59424
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2016-03-14
Ever confirmed|0 |1
--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
Note that phiopt could still do min/max detection of a derived value, thus
for the PHI args look through unary ops it can associate a min/max with
and re-write as op (min/max (a, b)). Not sure if that's worth it complicating
the code.
Other than that removing the
else if (TREE_CODE (arg0) == COND_EXPR)
{
from fold_unary that does the operation sinking would "fix" this as well.