Mesa (master): aco: fix sub-dword overwrite check in RA validator
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Apr 28 23:29:08 UTC 2020
Module: Mesa
Branch: master
Commit: 43f2ba39ef4962ffe4591560de0babe485d555c6
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=43f2ba39ef4962ffe4591560de0babe485d555c6
Author: Rhys Perry <pendingchaos02 at gmail.com>
Date: Mon Apr 27 20:52:20 2020 +0100
aco: fix sub-dword overwrite check in RA validator
Signed-off-by: Rhys Perry <pendingchaos02 at gmail.com>
Reviewed-by: Daniel Schürmann <daniel at schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4772>
---
src/amd/compiler/aco_validate.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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]);
}
}
More information about the mesa-commit
mailing list