Module: Mesa Branch: staging/23.0 Commit: 7d3eed3b6e48dd6922a3863edab3807310d01fda URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=7d3eed3b6e48dd6922a3863edab3807310d01fda
Author: Eric Engestrom <[email protected]> Date: Mon Apr 17 12:47:45 2023 +0100 amd: fix buggy usage of unreachable() Cc: mesa-stable Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22529> (cherry picked from commit 0a0e4854211d761e69d20a562af9a681caf877d3) --- .pick_status.json | 2 +- src/amd/llvm/ac_llvm_build.c | 8 ++++---- src/gallium/drivers/r600/sfn/sfn_nir_lower_64bit.cpp | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index feea2958e97..ef72f6a67c4 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -2554,7 +2554,7 @@ "description": "amd: fix buggy usage of unreachable()", "nominated": true, "nomination_type": 0, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": null, "notes": null diff --git a/src/amd/llvm/ac_llvm_build.c b/src/amd/llvm/ac_llvm_build.c index f0a91455ed0..97176b4c147 100644 --- a/src/amd/llvm/ac_llvm_build.c +++ b/src/amd/llvm/ac_llvm_build.c @@ -1930,7 +1930,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; } @@ -2720,7 +2720,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; } @@ -2751,7 +2751,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; } @@ -2832,7 +2832,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] = { diff --git a/src/gallium/drivers/r600/sfn/sfn_nir_lower_64bit.cpp b/src/gallium/drivers/r600/sfn/sfn_nir_lower_64bit.cpp index 09f294ca481..ffeafe0f1b4 100644 --- a/src/gallium/drivers/r600/sfn/sfn_nir_lower_64bit.cpp +++ b/src/gallium/drivers/r600/sfn/sfn_nir_lower_64bit.cpp @@ -390,7 +390,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); }
