From 8e4145948f0ea8557df36f183fe6c627425af38d Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Wed, 22 Apr 2026 11:05:28 -0400 Subject: [PATCH] jay/opt_propagate: fold uflag copies Signed-off-by: Alyssa Rosenzweig Part-of: --- src/intel/compiler/jay/jay_opt_propagate.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/intel/compiler/jay/jay_opt_propagate.c b/src/intel/compiler/jay/jay_opt_propagate.c index 7f1b938e86d..484f11221a5 100644 --- a/src/intel/compiler/jay/jay_opt_propagate.c +++ b/src/intel/compiler/jay/jay_opt_propagate.c @@ -325,14 +325,14 @@ propagate_backwards(jay_function *f) continue; } - /* Fold UGPR->{GPR, FLAG} copies coming out of NIR */ - if (!flag && - canonicalize_for_bit_compare(I->type) == use->type && + /* Fold UGPR->{GPR, FLAG} and UFLAG->FLAG copies coming out of NIR */ + 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) { - I->dst = use->dst; + *(flag ? &I->cond_flag : &I->dst) = use->dst; jay_remove_instruction(use); continue; }