https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96854
--- Comment #6 from Richard Biener <rguenth at gcc dot gnu.org> --- (In reply to Michael_S from comment #4) > Pay attention that it's not just AVX. > '-mavx2 -mfma -Ofast' generates different code, but at the end gives the > same wrong result. > Unfortunately, I have no AVX512 hardware to test, but wouldn't be surprised > if it's also broken in 10.2. Even SSE codegen is broken, you just need -fno-vect-cost-model to trigger it there.