clc: Always use spir for 32 bit

Fixes unknown target triple
'unknown-unknown-unknown-spirv-unknown-unknown' problem with llvm 17 on
a 32 bit system.

Fixes: 22fa315ee0 ("clc: use spirv triple starting with llvm-17")

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29049>
(cherry picked from commit db7bfe85ae)
This commit is contained in:
Christian Gmeiner 2024-05-04 01:55:53 +02:00 committed by Eric Engestrom
parent e0c70876dd
commit 9eb0a4292f
2 changed files with 2 additions and 2 deletions

View file

@ -194,7 +194,7 @@
"description": "clc: Always use spir for 32 bit",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "22fa315ee0622b73956cebf8375497f3ccb8d456",
"notes": null

View file

@ -792,7 +792,7 @@ clc_compile_to_llvm_module(LLVMContext &llvm_ctx,
};
#if LLVM_VERSION_MAJOR >= 17
const char *triple = args->address_bits == 32 ? "spirv-unknown-unknown" : "spirv64-unknown-unknown";
const char *triple = args->address_bits == 32 ? "spir-unknown-unknown" : "spirv64-unknown-unknown";
#else
const char *triple = args->address_bits == 32 ? "spir-unknown-unknown" : "spir64-unknown-unknown";
#endif