From 4a238f461d788233029aba6c7469c9ccf00ef8e4 Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Fri, 18 Apr 2025 13:21:09 -0700 Subject: [PATCH] brw: Do cmod prop again after brw_lower_subgroup_ops shader-db: All Intel platforms had similar results. (Lunar Lake shown) total instructions in shared programs: 17114300 -> 17114294 (<.01%) instructions in affected programs: 3617 -> 3611 (-0.17%) helped: 6 / HURT: 0 total cycles in shared programs: 886397556 -> 886397454 (<.01%) cycles in affected programs: 511400 -> 511298 (-0.02%) helped: 6 / HURT: 0 fossil-db: Lunar Lake Totals: Instrs: 233683694 -> 233676039 (-0.00%); split: -0.00%, +0.00% Cycle count: 32602038466 -> 32594097814 (-0.02%); split: -0.03%, +0.01% Spill count: 540908 -> 540704 (-0.04%) Fill count: 700935 -> 700258 (-0.10%) Totals from 2200 (0.28% of 789264) affected shaders: Instrs: 2062360 -> 2054705 (-0.37%); split: -0.37%, +0.00% Cycle count: 2506073282 -> 2498132630 (-0.32%); split: -0.41%, +0.09% Spill count: 14423 -> 14219 (-1.41%) Fill count: 34219 -> 33542 (-1.98%) Meteor Lake and DG2 had similar results. (Meteor Lake shown) Totals: Instrs: 263545171 -> 263543341 (-0.00%); split: -0.00%, +0.00% Cycle count: 26480835985 -> 26484748317 (+0.01%); split: -0.01%, +0.03% Spill count: 554335 -> 554338 (+0.00%) Fill count: 645486 -> 645498 (+0.00%) Totals from 610 (0.07% of 903944) affected shaders: Instrs: 1139871 -> 1138041 (-0.16%); split: -0.17%, +0.01% Cycle count: 2274612327 -> 2278524659 (+0.17%); split: -0.15%, +0.33% Spill count: 15153 -> 15156 (+0.02%) Fill count: 36831 -> 36843 (+0.03%) Tiger Lake, Ice Lake, and Skylake had similar results. (Tiger Lake shown) Totals: Instrs: 268713723 -> 268712817 (-0.00%); split: -0.00%, +0.00% Cycle count: 24653238085 -> 24652269669 (-0.00%); split: -0.00%, +0.00% Fill count: 671369 -> 671361 (-0.00%) Totals from 666 (0.07% of 899711) affected shaders: Instrs: 924423 -> 923517 (-0.10%); split: -0.11%, +0.01% Cycle count: 840380565 -> 839412149 (-0.12%); split: -0.13%, +0.02% Fill count: 13006 -> 12998 (-0.06%) Reviewed-by: Caio Oliveira Part-of: --- src/intel/compiler/brw_opt.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/intel/compiler/brw_opt.cpp b/src/intel/compiler/brw_opt.cpp index 1eb46ebc8f2..52eca022d1f 100644 --- a/src/intel/compiler/brw_opt.cpp +++ b/src/intel/compiler/brw_opt.cpp @@ -103,7 +103,9 @@ brw_optimize(brw_shader &s) OPT(brw_opt_dead_code_eliminate); } - OPT(brw_lower_subgroup_ops); + if (OPT(brw_lower_subgroup_ops)) + OPT(brw_opt_cmod_propagation); + OPT(brw_lower_csel); OPT(brw_lower_simd_width); OPT(brw_lower_scalar_fp64_MAD);