amd: fix buggy usage of unreachable()

Cc: mesa-stable
Signed-off-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22529>
(cherry picked from commit 0a0e485421)
This commit is contained in:
Eric Engestrom 2023-04-17 12:47:45 +01:00 committed by Eric Engestrom
parent 3eeb4bedfa
commit 0a0822e601
3 changed files with 6 additions and 6 deletions

View file

@ -85,7 +85,7 @@
"description": "amd: fix buggy usage of unreachable()",
"nominated": true,
"nomination_type": 0,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": null
},

View file

@ -1693,7 +1693,7 @@ LLVMValueRef ac_build_umsb(struct ac_llvm_context *ctx, LLVMValueRef arg, LLVMTy
zero = ctx->i8_0;
break;
default:
unreachable(!"invalid bitsize");
unreachable("invalid bitsize");
break;
}
@ -2483,7 +2483,7 @@ LLVMValueRef ac_build_bit_count(struct ac_llvm_context *ctx, LLVMValueRef src0)
result = LLVMBuildZExt(ctx->builder, result, ctx->i32, "");
break;
default:
unreachable(!"invalid bitsize");
unreachable("invalid bitsize");
break;
}
@ -2514,7 +2514,7 @@ LLVMValueRef ac_build_bitfield_reverse(struct ac_llvm_context *ctx, LLVMValueRef
result = LLVMBuildZExt(ctx->builder, result, ctx->i32, "");
break;
default:
unreachable(!"invalid bitsize");
unreachable("invalid bitsize");
break;
}
@ -2595,7 +2595,7 @@ LLVMValueRef ac_find_lsb(struct ac_llvm_context *ctx, LLVMTypeRef dst_type, LLVM
zero = ctx->i8_0;
break;
default:
unreachable(!"invalid bitsize");
unreachable("invalid bitsize");
}
LLVMValueRef params[2] = {

View file

@ -383,7 +383,7 @@ LowerSplit64BitVar::split_double_load_deref(nir_intrinsic_instr *intr)
else if (deref->deref_type == nir_deref_type_array)
return split_load_deref_array(intr, deref->arr.index);
else {
unreachable(0 && "only splitting of loads from vars and arrays is supported");
unreachable("only splitting of loads from vars and arrays is supported");
}
m_old_stores.push_back(&intr->instr);
}