https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112096
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> --- (In reply to Andrew Pinski from comment #2) > ``` > int t01(int x, int y) > { > bool t = x == 5 && y == 5; > if (t) return 5; return y; > } // y > ``` > Is able to be detected in phiopt2. Just not the == 0/!=0 case. r0-125639-gc9ef86a1717dd6 added that code. https://inbox.sourceware.org/gcc-patches/000001cebdbf$a3155310$e93ff930$@arm.com/ I really have not read this code in over 10 years and I forgot I even reviewed it slightly. Anyways I am thinking about ways of improving this even further ... And maybe even rewriting part of it since it has got way too complex.