aco: don't assume split_vector(create_vector) has the same number of elements when...
authorDaniel Schürmann <daniel@schuermann.dev>
Thu, 27 Feb 2020 12:06:36 +0000 (13:06 +0100)
committerDaniel Schürmann <daniel@schuermann.dev>
Fri, 3 Apr 2020 22:13:15 +0000 (23:13 +0100)
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-By: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4002>

src/amd/compiler/aco_optimizer.cpp

index f3819676df9bf8775eefc668ee3581f250bf1227..7a5b8f9d7560d2f83bed9a8e0d0fac8f3927803e 100644 (file)
@@ -929,7 +929,8 @@ void label_instruction(opt_ctx &ctx, Block& block, aco_ptr<Instruction>& 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()) {