From c12497f9431feacfee50397981a91d6909b17b5b Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Tue, 5 Aug 2025 01:36:02 -0700 Subject: [PATCH] brw: Update copy propagation into EOT sends handling for Xe2 units We're counting in REG_SIZE units here, but g112-127 is twice as large on Xe2. Check against 15 * reg_unit() to avoid missing out on propagation. fossil-db results on Arc B580: Totals: Instrs: 233779396 -> 233779098 (-0.00%) Cycle count: 32601212742 -> 32601187382 (-0.00%); split: -0.00%, +0.00% Max live registers: 72695253 -> 72694326 (-0.00%); split: -0.00%, +0.00% Totals from 232 (0.03% of 789301) affected shaders: Instrs: 41071 -> 40773 (-0.73%) Cycle count: 1756714 -> 1731354 (-1.44%); split: -2.01%, +0.57% Max live registers: 22092 -> 21165 (-4.20%); split: -4.48%, +0.28% Fixes: ec2e8bc33f5 ("intel/compiler: Avoid copy propagating large registers into EOT messages") Reviewed-by: Caio Oliveira Part-of: --- src/intel/compiler/brw_opt_copy_propagation.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/intel/compiler/brw_opt_copy_propagation.cpp b/src/intel/compiler/brw_opt_copy_propagation.cpp index 35aeb0fcdc9..43edfa2e90a 100644 --- a/src/intel/compiler/brw_opt_copy_propagation.cpp +++ b/src/intel/compiler/brw_opt_copy_propagation.cpp @@ -686,7 +686,7 @@ eot_send_has_constraint(brw_shader &s, brw_inst *inst, brw_reg val, int arg) s.alloc.sizes[inst->src[other_src].nr] : (inst->size_read(devinfo, other_src) / REG_SIZE); unsigned prop_src_size = s.alloc.sizes[val.nr]; - if (other_size + prop_src_size > 15) + if (other_size + prop_src_size > 15 * reg_unit(devinfo)) return true; }