diff --git a/src/amd/compiler/aco_register_allocation.cpp b/src/amd/compiler/aco_register_allocation.cpp index 441fcf8cc79..e52424044c4 100644 --- a/src/amd/compiler/aco_register_allocation.cpp +++ b/src/amd/compiler/aco_register_allocation.cpp @@ -1353,6 +1353,8 @@ PhysReg compact_relocate_vars(ra_ctx& ctx, const std::vector& var space_reg = next_reg; } + adjust_max_used_regs(ctx, var.info.rc, next_reg); + next_reg = next_reg.advance(var.info.rc.size() * 4); }