https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121787
--- Comment #8 from Jeffrey A. Law <law at gcc dot gnu.org> --- Reviewing the vsetvl code I don't see any obvious reason why we couldn't use AVOID_CFG_MODIFICATIONS for the loop_optimizer_init call. It does depend on connecting infinite loops to the exit edge, but that's handled separately. There's always the possibility that the vsetvl code calls out somewhere that requires loops in a different state. I'm still reviewing, but right now using AVOID_CFG_MODIFICATIONS seems like the safest path forward.
