https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80548
--- Comment #6 from Aldy Hernandez <aldyh at gcc dot gnu.org> --- (In reply to Aldy Hernandez from comment #4) > Created attachment 51908 [details] > untested patch > > Like this. It fixes the problem at least for -O2. Richi responded that the current BB copier won't handle this: https://gcc.gnu.org/pipermail/gcc-patches/2021-December/585884.html