https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67470
--- Comment #6 from Richard Biener <rguenth at gcc dot gnu.org> --- g_40 = PHI <0B(9), &a(6)> invariant up to level 1, cost 21. pretmp_42 = g_40 == 0B; invariant up to level 1, cost 22. but we're only moving pretmp_42, not g_40. The PHI is controlled by if (f_16(D) != 0). But when applying stmt movement we are faced with g_40 = PHI <0B(9), &a(6)> turned into <bb 11>: # g_40 = PHI <0B(26), &a(21), &a(22), 0B(25)> whoops. That's because predicated store-motion already messed up the CFG without ensuring we have forwarder blocks that at least preserve the existing PHI node structure. This is a latent issue.