Can the next-generation Intel compiler add code-paths for multiple instruction sets?
11:28 30 Aug 2022

The Intel Classic Compiler had a compilation flag, -ax, which I'd use to generate additional code paths for multiple instructions sets, such as AVX-512, which was very convenient as I'd only build and receive a single binary.

With the next-generation Intel compiler, the documentation omits this flag from the full list of compiler flags, but it still makes a reference to it in other sections (including the porting guide).

When I attempt to use it with versions 2022.0.0 or 2022.0.1, ICPX tells me the flag is unrecognized:

icpx -axCORE-AVX512

Output:

icpx: command line warning #10430: Unsupported command line options encountered
These options as listed are not supported.
For more information, use '-qnextgen-diag'.
option list:
    -axCORE-AVX512

Is there a way to recover the old behaviour with the new compiler?

Otherwise, it looks like I will have to quintuple my CI time spent building and deploying to ship five binaries instead of one, not to mention that users will also now need to know what instructions their CPU supports.

c++ icc instruction-set compiler-flags icx