VOOZH about

URL: https://www.phoronix.com/news/GCC-FMV-Patches-APX-AVX10.2

⇱ Intel Preps GCC Function Multi-Versioning To Support APX & AVX10.2 - Phoronix


👁 Phoronix

Intel Preps GCC Function Multi-Versioning To Support APX & AVX10.2

Written by Michael Larabel in Intel on 3 June 2026 at 09:40 AM EDT. 11 Comments
Along with some GCC compiler tuning for Nova Lake and Diamond Rapids to deal with some new APX capabilities not proving beneficial for performance, new patch activity today is preparing GCC for function multi-versioning (FMV) for the AVX10.2 and APX instruction set extensions.

Function multi-versioning allows for the programmer to craft multiple versions of the same function that are then selected at run-time based upon the architecture extensions present on the CPU being executed. With a modern GCC toolchain this can be useful for developers to craft optimized code paths for modern CPUs with AVX2, AVX-512, and other ISA features with runtime selection while still being able to fall-back to generic code paths or less optimized versions dependent upon the host CPU being used.

👁 GCC FMV example


FMV support is a great compiler feature and the GNU Compiler Collection is now being extended to support FMV on AVX10.2 and APX. This patch allows for FMV to be used with AVX10.2 and APX features in preparing for the next-generation Intel processors with these capabilities.

The patch allows for attribute targets of "avx10.2","apxf","arch=diamondrapids", and "arch=novalake". The patch is currently under review for mainline GCC in what will then become GCC 17 stable next year.

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.