diff --git a/.pick_status.json b/.pick_status.json index 9cbf496e2dc..2a82579f19f 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -922,7 +922,7 @@ "description": "aco/ra: Fix off-by-one-error in print_regs", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "3675aefa84e363d820a3e596b9f2795a0d51c39f" }, diff --git a/src/amd/compiler/aco_register_allocation.cpp b/src/amd/compiler/aco_register_allocation.cpp index 3b71c39e438..5e620b3048f 100644 --- a/src/amd/compiler/aco_register_allocation.cpp +++ b/src/amd/compiler/aco_register_allocation.cpp @@ -355,8 +355,7 @@ private: /* helper function for debugging */ UNUSED void print_regs(ra_ctx& ctx, bool vgprs, RegisterFile& reg_file) { - unsigned max = vgprs ? ctx.program->max_reg_demand.vgpr : ctx.program->max_reg_demand.sgpr; - PhysRegInterval regs { vgprs ? PhysReg{256} : PhysReg{0}, max }; + PhysRegInterval regs = get_reg_bounds(ctx.program, vgprs ? RegType::vgpr : RegType::sgpr); char reg_char = vgprs ? 'v' : 's'; /* print markers */ @@ -387,7 +386,7 @@ UNUSED void print_regs(ra_ctx& ctx, bool vgprs, RegisterFile& reg_file) } printf("\n"); - printf("%u/%u used, %u/%u free\n", max - free_regs, max, free_regs, max); + printf("%u/%u used, %u/%u free\n", regs.size - free_regs, regs.size, free_regs, regs.size); /* print assignments */ prev = 0;