Darwin lazily saves the AVX512 context on first use: instead of checking
that it already does to figure out if the OS supports AVX512, trust that
the kernel will do the right thing and always assume the context save
support is available.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
sysctl would return AVX512 as optional, but I am not sure if that adds any value? As mentioned in the comment, Darwin will save the AXV512 context on AVX512 hardware on-demand. More details can be found here: https://github.com/apple/darwin-xnu/blob/master/osfmk/i386/fpu.c#L174
Comment Actions
How long has that support been in Darwin. Is it possible someone might be using an old version of darwin that completely lacks avx512 support and tries to run -march=native on a recent CPU? I guess that can only happen in a hackintosh setup since any Apple system that supports avx512 would have proper kernel support.