https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96854
--- Comment #4 from Michael_S <already5chosen at yahoo dot com> --- 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.