From 2ab8a614ddc09a6a6f6d82a5a6dbe28c9210262b Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Wed, 15 Apr 2026 14:32:59 -0400 Subject: [PATCH] jay/register_allocate: tie predicated-defaults (if we can) Signed-off-by: Alyssa Rosenzweig Part-of: --- src/intel/compiler/jay/jay_register_allocate.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/intel/compiler/jay/jay_register_allocate.c b/src/intel/compiler/jay/jay_register_allocate.c index 02c5e11a1c6..1852b998ee4 100644 --- a/src/intel/compiler/jay/jay_register_allocate.c +++ b/src/intel/compiler/jay/jay_register_allocate.c @@ -795,6 +795,12 @@ pick_regs(jay_ra_state *ra, !(min_stride <= stride && stride <= max_stride)) continue; + /* Try to tie predicated default values, otherwise post-RA lowering needs + * to insert a predicated-MOV or SEL. + */ + if (I->predication == JAY_PREDICATED_DEFAULT && !is_src) + cost += jay_inst_get_default(I)->reg != r; + /* Assigning a stride that is too big may result in SIMDness splitting. * Model that cost so we prefer packed registers. */