diff --git a/src/intel/compiler/jay/jay_assign_accumulators.c b/src/intel/compiler/jay/jay_assign_accumulators.c index e1b96170ac3..04f8a0eb214 100644 --- a/src/intel/compiler/jay/jay_assign_accumulators.c +++ b/src/intel/compiler/jay/jay_assign_accumulators.c @@ -323,11 +323,12 @@ pass(jay_function *func) * * The bspec says "Instructions that specify an implicit accumulator * source cannot specify an explicit accumulator source operand.". But - * it works fine on Lunar Lake so ¯\_(ツ)_/¯ + * it works fine on Lunar Lake so ¯\_(ツ)_/¯ ... gate on !strict. */ if ((I->op == JAY_OPCODE_MAD && I->type == JAY_TYPE_F32) && (I->src[2].file == ACCUM && I->src[2].reg == 0) && - !(I->src[2].negate || I->src[2].abs)) { + !(I->src[2].negate || I->src[2].abs) && + !(jay_debug & JAY_DBG_STRICT)) { I->op = JAY_OPCODE_MAC; } diff --git a/src/intel/compiler/jay/jay_from_nir.c b/src/intel/compiler/jay/jay_from_nir.c index 8cf0651059b..ef0083eaddd 100644 --- a/src/intel/compiler/jay/jay_from_nir.c +++ b/src/intel/compiler/jay/jay_from_nir.c @@ -41,6 +41,7 @@ static const struct debug_named_value jay_debug_options[] = { { "sync", JAY_DBG_SYNC, "Sync after every instruction" }, { "noacc", JAY_DBG_NOACC, "Disable accumulator substitution" }, { "nosched", JAY_DBG_NOSCHED, "Disable scheduling" }, + { "strict", JAY_DBG_STRICT, "Strictly conform to bspec/fulsim" }, DEBUG_NAMED_VALUE_END }; diff --git a/src/intel/compiler/jay/jay_private.h b/src/intel/compiler/jay/jay_private.h index 1ce8638346e..29100310d88 100644 --- a/src/intel/compiler/jay/jay_private.h +++ b/src/intel/compiler/jay/jay_private.h @@ -18,6 +18,7 @@ extern "C" { #define JAY_DBG_SYNC BITFIELD_BIT(3) #define JAY_DBG_NOACC BITFIELD_BIT(4) #define JAY_DBG_NOSCHED BITFIELD_BIT(5) +#define JAY_DBG_STRICT BITFIELD_BIT(6) extern int jay_debug; bool jay_nir_lower_bool(nir_shader *nir);