https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91880
--- Comment #1 from jcmvbkbc at gcc dot gnu.org --- Minimal reproducer: void f(unsigned int n, char *a, char *b) { int i; for (i = 0; i <= n - 1; ++i) a[i] = b[i]; } The issue is that entry_bb is empty in the hwloop_optimize, and entry_after is NULL.