gallivm: check for avx512vbmi and tell LLVM the correct answer.

There are some CPUs out there which don't have vbmi and do have
other avx512 and mesa crashes on those with illegal instructions.

This was reported to Red Hat support.

Cc: mesa-stable
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34282>
(cherry picked from commit 5d6d167a7c)
This commit is contained in:
Dave Airlie 2025-03-31 11:43:17 +10:00 committed by Eric Engestrom
parent c8f9b803fa
commit cd8715440a
2 changed files with 2 additions and 1 deletions

View file

@ -544,7 +544,7 @@
"description": "gallivm: check for avx512vbmi and tell LLVM the correct answer.",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": null,
"notes": null

View file

@ -383,6 +383,7 @@ lp_build_fill_mattrs(std::vector<std::string> &MAttrs)
MAttrs.push_back(util_get_cpu_caps()->has_avx512bw ? "+avx512bw" : "-avx512bw");
MAttrs.push_back(util_get_cpu_caps()->has_avx512dq ? "+avx512dq" : "-avx512dq");
MAttrs.push_back(util_get_cpu_caps()->has_avx512vl ? "+avx512vl" : "-avx512vl");
MAttrs.push_back(util_get_cpu_caps()->has_avx512vbmi ? "+avx512vbmi" : "-avx512vbmi");
#endif
#if DETECT_ARCH_ARM
if (!util_get_cpu_caps()->has_neon) {