diff --git a/src/intel/compiler/jay/jay_lower_pre_ra.c b/src/intel/compiler/jay/jay_lower_pre_ra.c index d71ea7c3711..28e828a3886 100644 --- a/src/intel/compiler/jay/jay_lower_pre_ra.c +++ b/src/intel/compiler/jay/jay_lower_pre_ra.c @@ -143,6 +143,9 @@ try_swap_src01(jay_inst *I) static void lower_immediates(jay_builder *b, jay_inst *I, struct hash_table_u64 *constants) { + if (I->num_srcs == 0) + return; + /* Canonicalize compare-with-zero to increase freedom */ if (I->op == JAY_OPCODE_CMP && jay_is_zero(I->src[1]) &&