From: Rhys Perry Date: Mon, 27 Apr 2020 19:52:20 +0000 (+0100) Subject: aco: fix sub-dword overwrite check in RA validator X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=43f2ba39ef4962ffe4591560de0babe485d555c6;p=mesa.git aco: fix sub-dword overwrite check in RA validator Signed-off-by: Rhys Perry Reviewed-by: Daniel Schürmann Part-of: --- diff --git a/src/amd/compiler/aco_validate.cpp b/src/amd/compiler/aco_validate.cpp index 187155beded..3323acf9899 100644 --- a/src/amd/compiler/aco_validate.cpp +++ b/src/amd/compiler/aco_validate.cpp @@ -591,7 +591,7 @@ bool validate_ra(Program *program, const struct radv_nir_compiler_options *optio } if (def.regClass().is_subdword() && !instr_can_access_subdword(instr)) { for (unsigned j = tmp.bytes(); j < 4; j++) - if (reg.reg_b + j) + if (regs[reg.reg_b + j]) err |= ra_fail(output, loc, assignments.at(regs[reg.reg_b + j]).defloc, "Assignment of element %d of %%%d overwrites the full register taken by %%%d from instruction", i, tmp.id(), regs[reg.reg_b + j]); } }