https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116098
--- Comment #11 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Created attachment 59028 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=59028&action=edit semi-cleaned up testcase For this testcase you need to compile with -DBROKEN=1 to see the broken code. It becomes obvious that the difference is the label when it comes to phiopt here. The heurstics that was added for PR71016 don't ignore labels (and other nop related things). Fixing that fixes the wrong code and might improve other cases too.