https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91540
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |missed-optimization Status|UNCONFIRMED |NEW Last reconfirmed| |2019-08-26 Version|tree-ssa |10.0 Summary|Missed optimization: |missed value-replacement in |simplification CFG |phiopt Ever confirmed|0 |1 Severity|normal |enhancement --- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> --- Hmm. So we have <bb 2> [local count: 1073741824]: _5 = cond1_2(D) & cond2_3(D); if (_5 != 0) goto <bb 3>; [17.00%] else goto <bb 4>; [83.00%] <bb 3> [local count: 182536110]: <bb 4> [local count: 1073741824]: # _1 = PHI <42(3), 43(2)> return _1; and value-replacement would be _5 = cond1_2(D) & cond2_3(D); _6 = (int)_5; _7 = _6 ^ 43; return _7; so something for phiopt. And for the inverse case _6 | 42. Then only RTL has to elide the bool -> int promotion.