.GCC in GCC Toolset 12: CPU detection may fail on Intel Sapphire Rapids processors
CPU detection on Intel Sapphire Rapids processors relies on the existence of the `AVX512_VP2INTERSECT` feature. This feature has been removed from the GCC Toolset 12 version of GCC and, as a consequence, CPU detection may fail on Intel Sapphire Rapids processors.
__builtin_cpu_is("sapphirerapids") will fail on SPR with GTS12.0 since it relies on existence of AVX512_VP2INTERSECT which has been removed in the latest update of hardware.
We have upstream and backport the fix patch to GCC12 release branch
https://gcc.gnu.org/pipermail/gcc-patches/2022-November/605277.html
But I'm afraid it's too later to the recent GTS12.0 DTS12.0 release. The fix will be in GTS12.1/GTS12.1 in May 2023, and there's a ~5 month gap where __builtin_cpu_is ("sapphirerapids") is failed on SPR.
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory (gcc-toolset-12-gcc bug fix and enhancement update), and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://access.redhat.com/errata/RHEA-2023:2305
__builtin_cpu_is("sapphirerapids") will fail on SPR with GTS12.0 since it relies on existence of AVX512_VP2INTERSECT which has been removed in the latest update of hardware. We have upstream and backport the fix patch to GCC12 release branch https://gcc.gnu.org/pipermail/gcc-patches/2022-November/605277.html But I'm afraid it's too later to the recent GTS12.0 DTS12.0 release. The fix will be in GTS12.1/GTS12.1 in May 2023, and there's a ~5 month gap where __builtin_cpu_is ("sapphirerapids") is failed on SPR.