https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78899
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> --- The original ICE is with -flto, but modified testcase: /* PR c++/71077 */ /* { dg-do compile { target { i?86-*-* x86_64-*-* } } } */ /* { dg-options "-O3 -march=core-avx2" } */ int *a; static int b, c, d, e; static inline int sched_analyze(void) { for (; b; b++) { c = 0; for (; c < 32; c++) if (b & 1 << c) a[b + c] = d; } return 0; } static inline void schedule_insns(void) { e = sched_analyze(); } int main(void) { schedule_insns(); } ICEs with the last patch even without -flto.