aco: validate temp_rc

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30399>
This commit is contained in:
Georg Lehmann
2024-07-28 14:00:29 +02:00
committed by Marge Bot
parent 53155ba12d
commit b92134e088
+10
View File
@@ -77,6 +77,16 @@ validate_ir(Program* program)
for (Block& block : program->blocks) {
for (aco_ptr<Instruction>& instr : block.instructions) {
if (program->progress < CompilationProgress::after_lower_to_hw) {
for (const Operand& op : instr->operands)
check(!op.isTemp() || op.regClass() == program->temp_rc[op.tempId()],
"Operand RC not consistent.", instr.get());
for (const Definition& def : instr->definitions)
check(!def.isTemp() || def.regClass() == program->temp_rc[def.tempId()],
"Definition RC not consistent.", instr.get());
}
unsigned pck_defs = instr_info.definitions[(int)instr->opcode];
unsigned pck_ops = instr_info.operands[(int)instr->opcode];