ac/llvm: handle int8 inside ac_build_optimization_barrier

Rusticl wants to support more subgroup operations and with CL they use
8bit integer sources as well.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37169>
This commit is contained in:
Karol Herbst 2025-09-09 22:44:30 +02:00 committed by Marge Bot
parent dee90bf617
commit db6394babc

View file

@ -418,7 +418,7 @@ void ac_build_optimization_barrier(struct ac_llvm_context *ctx, LLVMValueRef *pg
} else {
LLVMTypeRef old_type = LLVMTypeOf(*pgpr);
if (old_type == ctx->i1)
if (old_type == ctx->i1 || old_type == ctx->i8)
*pgpr = LLVMBuildZExt(builder, *pgpr, ctx->i32, "");
if (old_type == LLVMVectorType(ctx->i16, 3))
@ -430,7 +430,7 @@ void ac_build_optimization_barrier(struct ac_llvm_context *ctx, LLVMValueRef *pg
*pgpr = LLVMBuildCall2(builder, ftype, inlineasm, pgpr, 1, "");
if (old_type == ctx->i1)
if (old_type == ctx->i1 || old_type == ctx->i8)
*pgpr = LLVMBuildTrunc(builder, *pgpr, old_type, "");
if (old_type == LLVMVectorType(ctx->i16, 3))