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 <bas@basnieuwenhuizen.nl>
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user