https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77769 --- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> --- The testcase you attached can't work because we can't inline an avx2 function into a function not having avx2 enabled.