https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108230
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |missed-optimization, | |needs-bisection, | |needs-reduction Known to work| |13.0 --- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> --- There is a missed jump threading before uninit1: if (_12 != 0) goto <bb 9>; [89.00%] else goto <bb 7>; [11.00%] <bb 7> [local count: 12992276]: D.172541 ={v} {CLOBBER(eol)}; if (_12 == 0) goto <bb 20>; [51.12%] else goto <bb 8>; [48.88%] <bb 8> [local count: 6802844]: _130 = MEM[(const float &)&e]; The jump threading is fully fixed on the trunk for GCC 13. For GCC 11, the jump threading is also missed but missed for a different reason: _20 = __builtin_popcountl (_12); ... _24 = (long int) _20; ... if (_12 != 0) goto <bb 7>; [89.00%] else goto <bb 12>; [11.00%] <bb 7> [local count: 105119324]: if (_24 != 0) goto <bb 11>; [99.96%] else goto <bb 10>; [0.04%] So there is no optimization of ((long)popcount(_12))!=0 into _12 != 0 in GCC 11 but that happens in GCC 12 and the jump threading is then missed but was fixed in GCC 13. The assert there causes the usage of _20 (d) in place of c in some cases which causes some IR differences which influences the warning ...