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 c/59424] Optimization issue on min/max


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.

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