[igt-dev] [PATCH i-g-t 3/4] assembler: Compare correct things

Petri Latvala petri.latvala at intel.com
Mon Oct 29 14:30:53 UTC 2018


This code is supposedly checking of the given register is nr=0 in ARF but
was instead checking twice if the register is anything in ARF.

Signed-off-by: Petri Latvala <petri.latvala at intel.com>
---
 assembler/brw_eu_emit.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/assembler/brw_eu_emit.c b/assembler/brw_eu_emit.c
index d4fadffa..ca93245b 100644
--- a/assembler/brw_eu_emit.c
+++ b/assembler/brw_eu_emit.c
@@ -180,7 +180,7 @@ validate_reg(struct brw_instruction *insn, struct brw_reg reg)
    }
 
    if (reg.file == BRW_ARCHITECTURE_REGISTER_FILE &&
-       reg.file == BRW_ARF_NULL)
+       reg.nr == BRW_ARF_NULL)
       return;
 
    assert(reg.hstride >= 0 && reg.hstride < Elements(hstride_for_reg));
-- 
2.18.0



More information about the igt-dev mailing list