From 176b9a0f0c46a9983d13736ac593a178d303ce03 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Wed, 15 Apr 2026 14:31:25 -0400 Subject: [PATCH] jay/opt_dead_code: handle predication otherwise we'll get validation splat soon. Signed-off-by: Alyssa Rosenzweig Part-of: --- src/intel/compiler/jay/jay_opt_dead_code.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/intel/compiler/jay/jay_opt_dead_code.c b/src/intel/compiler/jay/jay_opt_dead_code.c index da9d7299d57..72d3a7f29c4 100644 --- a/src/intel/compiler/jay/jay_opt_dead_code.c +++ b/src/intel/compiler/jay/jay_opt_dead_code.c @@ -4,6 +4,7 @@ */ #include "util/bitset.h" +#include "jay_builder.h" #include "jay_ir.h" #include "jay_opcodes.h" #include "jay_private.h" @@ -18,6 +19,12 @@ pass(jay_function *f) if (!BITSET_TEST_COUNT(live_set, jay_base_index(I->dst), jay_num_values(I->dst)) && I->op != JAY_OPCODE_SEND) { + + if (I->predication == JAY_PREDICATED_DEFAULT && !jay_is_null(I->dst)) { + jay_shrink_sources(I, I->num_srcs - 1); + I->predication = JAY_PREDICATED; + } + I->dst = jay_null(); }