https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107727
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Build|x86_64-linux-gnu | Ever confirmed|0 |1 Severity|normal |enhancement Target|x86_64-w64-mingw32 |ones which don't support | |ifunc Last reconfirmed| |2022-11-16 Host|x86_64-linux-gnu | Component|target |middle-end --- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> --- What they do is basically have the resolver always called: callq __cpu_indicator_init movl __cpu_model+12(%rip), %eax andl $1024, %eax # imm = 0x400 cmpl $1024, %eax # imm = 0x400 sete %al andb $1, %al testb $1, %al jne .LBB1_1 jmp .LBB1_2 .LBB1_1: addq $40, %rsp jmp _Z3foov.avx2 # TAILCALL .LBB1_2: nop addq $40, %rsp jmp _Z3foov # TAILCALL Not the fastest way of implementing this either. A faster way to caching the result of the resolver. Anyways we currently don't support multiversioning for non-ifuncs supported targets. Someone will need to program up that support but it might be years unless you pay someone to do it.