Landing: 4e45547e66cc

Project / Subsystem

gcc / x86

Date

2026-05-02

Author

H.J. Lu

Commit

4e45547e66cc7bc144ccfeffabe4856175a8a699

Source

github

Perf win

No

Breaking

No

All attributes

project
gcc
subsystem
x86
patch_id
commit_hash
4e45547e66cc7bc144ccfeffabe4856175a8a699
source_type
github
headline
X86: Avoid AVX-512 instruction generation on non-AVX512 CPUs.
tldr
Fixes a SIGILL error that occurred when AVX512 instructions were generated on CPUs lacking AVX512 support by adding a runtime CPU feature check.
author
H.J. Lu
outcome
committed
performance_win
false
breaking_change
false
series_id
series_parts
[]
tags
  • x86
  • avx512
  • sigill
  • optimization
discussion_id_link
bugzilla_pr
date
2026-05-02T00:00:00.000Z

The compiler was generating AVX512 instructions even when the target CPU lacked AVX512 support, leading to SIGILL errors. This commit extracts the test code into a separate function, do_test, and calls it only if __builtin_cpu_supports ("gfni") returns true, ensuring that AVX512 instructions are only executed on capable CPUs. This prevents the test from failing on CPUs without AVX512 support.