From 8a6de2d973009ef2ea93bcf25c426aa25177e3ed Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Tue, 3 Mar 2026 08:06:59 -0800 Subject: [PATCH] brw/validate: Eliminate duplicate integer multiply validation I think two MRs must have crossed in the mail so to speak. Keep Caio's formatting and error message, and keep my PRM quote. Reviewed-by: Caio Oliveira Part-of: --- src/intel/compiler/brw/brw_eu_validate.c | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/src/intel/compiler/brw/brw_eu_validate.c b/src/intel/compiler/brw/brw_eu_validate.c index 488c445a8db..e5738454bb6 100644 --- a/src/intel/compiler/brw/brw_eu_validate.c +++ b/src/intel/compiler/brw/brw_eu_validate.c @@ -1835,6 +1835,13 @@ instruction_restrictions(const struct brw_isa_info *isa, brw_type_is_int(src1_type)), "MUL can't mix floats and integer sources."); + /* Page 971 (page 987 of the PDF), section "Accumulator + * Restrictions," of the Broadwell PRM volume 7 says: + * + * Integer source operands cannot be accumulators. + * + * The Skylake and Ice Lake PRMs contain the same text. + */ ERROR_IF((brw_type_is_int(src0_type) && src0_is_acc(inst)) || (brw_type_is_int(src1_type) && src1_is_acc(inst)), "In MUL, Integer source operands cannot be accumulators."); @@ -1853,19 +1860,6 @@ instruction_restrictions(const struct brw_isa_info *isa, "When multiplying a DW and any lower precision integer, the " "DW operand must be src0."); - /* Page 971 (page 987 of the PDF), section "Accumulator - * Restrictions," of the Broadwell PRM volume 7 says: - * - * Integer source operands cannot be accumulators. - * - * The Skylake and Ice Lake PRMs contain the same text. - */ - ERROR_IF((src0_is_acc(inst) && - brw_type_is_int(src0_type)) || - (src1_is_acc(inst) && - brw_type_is_int(src1_type)), - "Integer source operands cannot be accumulators."); - /* Page 935 (page 951 of the PDF) of the Ice Lake PRM volume 2a says: * * When multiplying integer data types, if one of the sources is a