diff --git a/src/intel/compiler/jay/jay_lower_pre_ra.c b/src/intel/compiler/jay/jay_lower_pre_ra.c index 010edb97fad..c16a9d03d98 100644 --- a/src/intel/compiler/jay/jay_lower_pre_ra.c +++ b/src/intel/compiler/jay/jay_lower_pre_ra.c @@ -173,7 +173,7 @@ lower_immediates(jay_builder *b, jay_inst *I, struct hash_table_u64 *constants) bool last = s == (jay_num_isa_srcs(I) - 1); bool allowed = s < 2 && (last || I->op == JAY_OPCODE_SEND); - allowed |= (I->op == JAY_OPCODE_BFN && s == 0 && imm < UINT16_MAX); + allowed |= (I->op == JAY_OPCODE_BFN && s == 0 && imm <= UINT16_MAX); if (!allowed) { I->src[s] = lower_imm_to_ugpr(b, I, s, constants); diff --git a/src/intel/compiler/jay/jay_to_binary.c b/src/intel/compiler/jay/jay_to_binary.c index e40b629a628..2aa6408b033 100644 --- a/src/intel/compiler/jay/jay_to_binary.c +++ b/src/intel/compiler/jay/jay_to_binary.c @@ -87,7 +87,7 @@ to_brw_reg(jay_function *f, if (jay_type_size_bits(type) == 64) { type = jay_type_resize(type, 32); } else if (I->op == JAY_OPCODE_BFN) { - assert(jay_as_uint(d) < UINT16_MAX); + assert(jay_as_uint(d) <= UINT16_MAX); type = JAY_TYPE_U16; }