From db6394babc885c35a8689238fa87a87ff226565f Mon Sep 17 00:00:00 2001 From: Karol Herbst Date: Tue, 9 Sep 2025 22:44:30 +0200 Subject: [PATCH] ac/llvm: handle int8 inside ac_build_optimization_barrier MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Rusticl wants to support more subgroup operations and with CL they use 8bit integer sources as well. Reviewed-by: Marek Olšák Part-of: --- src/amd/llvm/ac_llvm_build.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/amd/llvm/ac_llvm_build.c b/src/amd/llvm/ac_llvm_build.c index e16f9382492..54314e23ec8 100644 --- a/src/amd/llvm/ac_llvm_build.c +++ b/src/amd/llvm/ac_llvm_build.c @@ -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))