https://gcc.gnu.org/bugzilla/show_bug.cgi?id=127773
--- Comment #6 from Hongtao Liu <liuhongt at gcc dot gnu.org> --- >Possible fix: return AVX_U128_CLEAN when no 256/512-bit value is live across >the >call, or when the callee is known to be compiled without AVX. Yes, that could be a solution. NOTE, for the testcase in the PR, vzeroupper is inserted after f even with -mavx2 since inline assembly is black box for GCC, but for the real workload, it's not inline assembly, but just different ISA level used in the function attribute.
