From 9dbaaecb74101344d2ae51fc06ae24baf5da6a37 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Thu, 7 May 2026 10:12:47 -0400 Subject: [PATCH] jay: swap predication/acc pass order Lets us use more accumulators, I think this is well motivated. Saw this in a test shader. Totals from 242 (9.14% of 2647) affected shaders: Instrs: 1365060 -> 1365035 (-0.00%); split: -0.00%, +0.00% CodeSize: 20678592 -> 20680096 (+0.01%); split: -0.01%, +0.02% Signed-off-by: Alyssa Rosenzweig Reviewed-by: Kenneth Graunke Part-of: --- src/intel/compiler/jay/jay_from_nir.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/intel/compiler/jay/jay_from_nir.c b/src/intel/compiler/jay/jay_from_nir.c index 35f65b1fbc3..e928efeeb86 100644 --- a/src/intel/compiler/jay/jay_from_nir.c +++ b/src/intel/compiler/jay/jay_from_nir.c @@ -2677,8 +2677,12 @@ jay_compile(const struct intel_device_info *devinfo, nir->info.bit_sizes_float); if (!(jay_debug & JAY_DBG_NOOPT)) { - JAY_PASS(s, jay_opt_predicate); + /* jay_assign_accumulators uses a conservative liveness analysis for + * predication, so assign accumulators before predicating for better + * results. + */ JAY_PASS(s, jay_assign_accumulators); + JAY_PASS(s, jay_opt_predicate); } JAY_PASS(s, jay_lower_scoreboard);