summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2019-03-17 21:04:20 +1100
committerTimothy Arceri <[email protected]>2019-03-18 09:39:04 +1100
commit010570c8e31daa67b4419cee36c79f44b0bc557b (patch)
tree0db57f198fe3c330cd58a22346df952b76f1cc65 /src
parentde8ec6e1179d0cef559e19cac8918d47cebf1957 (diff)
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 <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/amd/common/ac_nir_to_llvm.c2
1 files changed, 2 insertions, 0 deletions
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,