From 70d09d97ef8b916b501989cac36a176147bc59ca Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Mon, 27 Apr 2026 13:37:15 -0400 Subject: [PATCH] jay: predicate NoMask instructions in uniform IF's Totals: Instrs: 4742391 -> 4742257 (-0.00%) CodeSize: 70245120 -> 70243520 (-0.00%); split: -0.00%, +0.00% Totals from 81 (3.06% of 2647) affected shaders: Instrs: 337727 -> 337593 (-0.04%) CodeSize: 4992992 -> 4991392 (-0.03%); split: -0.03%, +0.00% Signed-off-by: Alyssa Rosenzweig Part-of: --- src/intel/compiler/jay/jay_opt_predicate.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/intel/compiler/jay/jay_opt_predicate.c b/src/intel/compiler/jay/jay_opt_predicate.c index 763cce66a02..329c9f3fe87 100644 --- a/src/intel/compiler/jay/jay_opt_predicate.c +++ b/src/intel/compiler/jay/jay_opt_predicate.c @@ -20,14 +20,14 @@ predicate_block(jay_builder *b, * * A few opcodes can't be predicated due to ISA restrictions. * - * Predicating NoMask instructions doesn't work if we are electing a nonzero - * lane but the NoMask forces lane 0. This should be optimized later. + * Predicating NoMask instructions only works with UFLAGs (where we know lane + * 0 controls the flag and we're not electing some other lane). */ jay_foreach_inst_in_block(block, I) { if (jay_uses_flag(I) || (I->op == JAY_OPCODE_MIN || I->op == JAY_OPCODE_MAX) || I->op == JAY_OPCODE_CSEL || - jay_is_no_mask(I) || + (condition.file != UFLAG && jay_is_no_mask(I)) || (--limit) < 0) return false; }