https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95790
--- Comment #5 from Yichao Yu <yyc1992 at gmail dot com> --- It’s wrong when running on a target that has avx512f. The unoptimuzed version will call the correct foo but the unoptimized case won’t. As I said, this is an issue when the total targets are different between the callee and caller.