[Mesa-dev] [PATCH] ac/nir_to_llvm: add assert to emit_bcsel()
Timothy Arceri
tarceri at itsqueeze.com
Sun Mar 17 10:04:20 UTC 2019
nir to llvm assumes we have already split vectors to scalars via
nir_lower_alu_to_scalar().
---
src/amd/common/ac_nir_to_llvm.c | 2 ++
1 file changed, 2 insertions(+)
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,
--
2.20.1
More information about the mesa-dev
mailing list