From: Daniel Schürmann Date: Thu, 27 Feb 2020 12:06:36 +0000 (+0100) Subject: aco: don't assume split_vector(create_vector) has the same number of elements when... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0bb35376764f0770df8f84e6383487f17328136e;p=mesa.git aco: don't assume split_vector(create_vector) has the same number of elements when optimizing Reviewed-by: Rhys Perry Reviewed-By: Timur Kristóf Part-of: --- diff --git a/src/amd/compiler/aco_optimizer.cpp b/src/amd/compiler/aco_optimizer.cpp index f3819676df9..7a5b8f9d756 100644 --- a/src/amd/compiler/aco_optimizer.cpp +++ b/src/amd/compiler/aco_optimizer.cpp @@ -929,7 +929,8 @@ void label_instruction(opt_ctx &ctx, Block& block, aco_ptr& instr) if (!ctx.info[instr->operands[0].tempId()].is_vec()) break; Instruction* vec = ctx.info[instr->operands[0].tempId()].instr; - assert(instr->definitions.size() == vec->operands.size()); + if (instr->definitions.size() != vec->operands.size()) + break; for (unsigned i = 0; i < instr->definitions.size(); i++) { Operand vec_op = vec->operands[i]; if (vec_op.isConstant()) {