From 8be7406c816b02596fa51f678954919844a0a450 Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Wed, 7 Dec 2022 11:11:42 -0800 Subject: [PATCH] intel/compiler: Assert that ARF used is the accumulator v2: Move the new check to be with similar existing checks. Suggested by Lionel. Reviewed-by: Lionel Landwerlin Part-of: --- src/intel/compiler/brw_eu_emit.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/intel/compiler/brw_eu_emit.c b/src/intel/compiler/brw_eu_emit.c index 5459db37c2c..abca49894be 100644 --- a/src/intel/compiler/brw_eu_emit.c +++ b/src/intel/compiler/brw_eu_emit.c @@ -827,7 +827,8 @@ brw_alu3(struct brw_codegen *p, unsigned opcode, struct brw_reg dest, if (brw_inst_access_mode(devinfo, inst) == BRW_ALIGN_1) { assert(dest.file == BRW_GENERAL_REGISTER_FILE || - dest.file == BRW_ARCHITECTURE_REGISTER_FILE); + (dest.file == BRW_ARCHITECTURE_REGISTER_FILE && + dest.nr == BRW_ARF_ACCUMULATOR)); if (devinfo->ver >= 12) { brw_inst_set_3src_a1_dst_reg_file(devinfo, inst, dest.file); @@ -907,7 +908,8 @@ brw_alu3(struct brw_codegen *p, unsigned opcode, struct brw_reg dest, (src0.file == BRW_ARCHITECTURE_REGISTER_FILE && src0.type == BRW_REGISTER_TYPE_NF)); assert(src1.file == BRW_GENERAL_REGISTER_FILE || - src1.file == BRW_ARCHITECTURE_REGISTER_FILE); + (src1.file == BRW_ARCHITECTURE_REGISTER_FILE && + src1.nr == BRW_ARF_ACCUMULATOR)); assert(src2.file == BRW_GENERAL_REGISTER_FILE || src2.file == BRW_IMMEDIATE_VALUE);