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.