https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114409
--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> --- (In reply to Andrew Pinski from comment #3) > (In reply to Sam James from comment #1) > > If you can think of a workaround, please let me know, as unfortunately this > > loop is the one where the assert in the other bug gets hit :( > > An easy workaround is to add: > asm("":::"memory"); > > Right after the opening `{`. > But that might be too much of a hammer in some cases ... Even a simple `__builtin_printf("");` added to the loop might avoid the vectorization to figure out where the wrong code happens.