ac/llvm: fix wave32 ac_build_mbcnt_add with 64-bit mask
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com> Reviewed-by: Timur Kristóf <timur.kristof@gmail.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Cc: mesa-stable Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24140>
This commit is contained in:
@@ -2752,6 +2752,9 @@ LLVMValueRef ac_build_mbcnt_add(struct ac_llvm_context *ctx, LLVMValueRef mask,
|
||||
LLVMValueRef val;
|
||||
|
||||
if (ctx->wave_size == 32) {
|
||||
if (LLVMTypeOf(mask) == ctx->i64)
|
||||
mask = LLVMBuildTrunc(ctx->builder, mask, ctx->i32, "");
|
||||
|
||||
val = ac_build_intrinsic(ctx, "llvm.amdgcn.mbcnt.lo", ctx->i32,
|
||||
(LLVMValueRef[]){mask, add}, 2, 0);
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user