From 0bb35376764f0770df8f84e6383487f17328136e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Daniel=20Sch=C3=BCrmann?= Date: Thu, 27 Feb 2020 13:06:36 +0100 Subject: [PATCH] aco: don't assume split_vector(create_vector) has the same number of elements when optimizing MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Reviewed-by: Rhys Perry Reviewed-By: Timur Kristóf Part-of: --- src/amd/compiler/aco_optimizer.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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()) { -- 2.30.2