From: Timothy Arceri Date: Sun, 17 Mar 2019 10:04:20 +0000 (+1100) Subject: ac/nir_to_llvm: add assert to emit_bcsel() X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=010570c8e31daa67b4419cee36c79f44b0bc557b;p=mesa.git ac/nir_to_llvm: add assert to emit_bcsel() nir to llvm assumes we have already split vectors to scalars via nir_lower_alu_to_scalar(). Reviewed-by: Bas Nieuwenhuizen --- diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c index 18297ed99b1..0ca3f83a248 100644 --- a/src/amd/common/ac_nir_to_llvm.c +++ b/src/amd/common/ac_nir_to_llvm.c @@ -268,6 +268,8 @@ static LLVMValueRef emit_intrin_3f_param(struct ac_llvm_context *ctx, static LLVMValueRef emit_bcsel(struct ac_llvm_context *ctx, LLVMValueRef src0, LLVMValueRef src1, LLVMValueRef src2) { + assert(LLVMGetTypeKind(LLVMTypeOf(src0)) != LLVMVectorTypeKind); + LLVMValueRef v = LLVMBuildICmp(ctx->builder, LLVMIntNE, src0, ctx->i32_0, ""); return LLVMBuildSelect(ctx->builder, v,