GCC Newspaper
OCTOBER 6, 2026
Date
/
Architectures
Components
Topics
News & Policy
Other
i386

xop-pcmov3.c: Disable AVX512F to fix assembler scan failures

Disables AVX512F in a test case to prevent assembler scan failures related to vpcmov.

Test failures in gcc.target/i386/xop-pcmov3.c occurred because the avx512vl_vternlogv4si_all pattern was being enabled, leading to unexpected vpcmov instructions in the assembly output. This commit modifies the test case to disable AVX512F using -mno-avx512f when TARGET_PREFER_AVX256 is not enabled by default, thus resolving the assembler scan failures.

In Details

The test case xop-pcmov3.c was failing because the avx512vl_vternlogv4si_all pattern, which is enabled by TARGET_AVX512VL or TARGET_AVX512F && !TARGET_PREFER_AVX256, generated vpcmov instructions. When TARGET_PREFER_AVX256 is not the default, TARGET_AVX512F can lead to this pattern. The fix disables AVX512F for this test using -mno-avx512f to avoid the unexpected instruction.

For Context
AVX512F
Advanced Vector Extensions 512-bit Fusion. A set of CPU instructions for advanced vector processing with 512-bit registers.
AVX512VL
Advanced Vector Extensions 512-bit Vector Length. Extends AVX-512 instructions to operate on 128-bit and 256-bit vectors as well.
vpcmov
A VEX-encoded instruction that performs a conditional move operation on packed data, available in AVX-512.
scan-assembler
A testsuite utility that checks if the generated assembly code contains specific patterns or avoids others.
Filed Under: i386avx512testsuitecompiler