From 86f19bc983bac70dc370f51881ca16a467403ebd Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Thu, 23 Apr 2026 11:11:03 -0400 Subject: [PATCH] jay: propagate inverse-ballots only locally Signed-off-by: Alyssa Rosenzweig Part-of: --- src/intel/compiler/jay/jay_opt_propagate.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/intel/compiler/jay/jay_opt_propagate.c b/src/intel/compiler/jay/jay_opt_propagate.c index 4fb168962a5..3d94cb8bd1c 100644 --- a/src/intel/compiler/jay/jay_opt_propagate.c +++ b/src/intel/compiler/jay/jay_opt_propagate.c @@ -333,12 +333,16 @@ propagate_backwards(jay_function *f) continue; } - /* Fold UGPR->{GPR, FLAG} and UFLAG->FLAG copies coming out of NIR */ + /* Fold UGPR->{GPR, FLAG} and UFLAG->FLAG copies coming out of NIR. + * Inverse-ballots are propagated only locally. + */ if (use->type == (flag ? JAY_TYPE_U1 : canonicalize_for_bit_compare(I->type)) && I->op != JAY_OPCODE_PHI_DST && use->op == JAY_OPCODE_MOV && - use->dst.file != J_ADDRESS) { + use->dst.file != J_ADDRESS && + (!jay_is_flag(use->dst) || + def_block[jay_base_index(use->dst)] == block->index)) { *(flag ? &I->cond_flag : &I->dst) = use->dst; jay_remove_instruction(use);