From 77c96290463b523f2aa44054de7df1f274175ab2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Sch=C3=BCrmann?= Date: Thu, 31 Dec 2020 10:43:43 +0000 Subject: [PATCH] aco/validate: ensure that Operand and Definition size matches for parallelcopies Reviewed-by: Rhys Perry Part-of: --- src/amd/compiler/aco_validate.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/amd/compiler/aco_validate.cpp b/src/amd/compiler/aco_validate.cpp index ffd25121726..7e67839294c 100644 --- a/src/amd/compiler/aco_validate.cpp +++ b/src/amd/compiler/aco_validate.cpp @@ -388,6 +388,7 @@ bool validate_ir(Program* program) } else if (instr->opcode == aco_opcode::p_parallelcopy) { check(instr->definitions.size() == instr->operands.size(), "Number of Operands does not match number of Definitions", instr.get()); for (unsigned i = 0; i < instr->operands.size(); i++) { + check(instr->definitions[i].bytes() == instr->operands[i].bytes(), "Operand and Definition size must match", instr.get()); if (instr->operands[i].isTemp()) check((instr->definitions[i].getTemp().type() == instr->operands[i].regClass().type()) || (instr->definitions[i].getTemp().type() == RegType::vgpr && instr->operands[i].regClass().type() == RegType::sgpr),