From 5ef47ba2318fc9273d65e4d3d088e31419dc951f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Sch=C3=BCrmann?= Date: Wed, 29 Oct 2025 12:19:02 +0100 Subject: [PATCH] aco/scheduler: assert that the register demand stays within pre-determined bounds Part-of: --- src/amd/compiler/aco_scheduler.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/amd/compiler/aco_scheduler.cpp b/src/amd/compiler/aco_scheduler.cpp index 14ecbe77b37..cdafb162ffb 100644 --- a/src/amd/compiler/aco_scheduler.cpp +++ b/src/amd/compiler/aco_scheduler.cpp @@ -1298,6 +1298,8 @@ schedule_program(Program* program) for (Block& block : program->blocks) { new_demand.update(block.register_demand); } + assert(!new_demand.exceeds(ctx.mv.max_registers) || + !new_demand.exceeds(program->max_reg_demand)); update_vgpr_sgpr_demand(program, new_demand); /* Validate live variable information */