GCC Newspaper
NOVEMBER 30, 2026
Date
/
Architectures
Components
Topics
News & Policy
Other
i386

i386: Prevent incorrect 256-bit vinsert instructions without AVX512VL

Fixes i386 to avoid emitting 256-bit vinsert instructions when AVX512VL is not enabled, preventing incorrect code generation.

This change corrects an issue in the i386 architecture’s instruction emission for 256-bit vector concatenations. Specifically, it prevents the generation of vinsert*64x2 and vinsert*32x4 instructions when the AVX512VL extension is not available. The fix involves changing a configuration flag to correctly reflect the dependency on AVX512VL for these instructions, ensuring code is generated according to the available instruction set.

In Details

The avx_vec_concat pattern in sse.md was incorrectly emitting 256-bit vinsert instructions when the target lacked AVX512VL. This commit adjusts the avx_vec_concat<mode> pattern to only allow these 256-bit vinsert instructions when TARGET_AVX512VL is enabled, resolving a regression in PR127459.

Filed Under: x86AVX512code generation