https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67975
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot gnu.org --- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> --- int foo (int x, int y) { int a = x > 5 ? x : y; int b = x > 5 ? x : y; return a == b; } this should be handled in FRE1 already (well, if hopefully easily possible). Currently two PHIs are only ever considered to have the same value if they appear in the same basic-block.