From fb59ed6bb9d70a410894afa998298f7e0c9160f5 Mon Sep 17 00:00:00 2001 From: Rhys Perry Date: Mon, 27 Apr 2020 17:54:49 +0100 Subject: [PATCH] aco: check alignment of non-subdword registers in get_reg_specified() MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit When splitting a v6b vector into v1 and v2b components, we should ensure the v1 definition doesn't start at the upper half. Signed-off-by: Rhys Perry Reviewed-by: Daniel Schürmann Part-of: --- src/amd/compiler/aco_register_allocation.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/amd/compiler/aco_register_allocation.cpp b/src/amd/compiler/aco_register_allocation.cpp index 02d4e9f8781..595be51ccd1 100644 --- a/src/amd/compiler/aco_register_allocation.cpp +++ b/src/amd/compiler/aco_register_allocation.cpp @@ -877,6 +877,8 @@ bool get_reg_specified(ra_ctx& ctx, { if (rc.is_subdword() && reg.byte() && !instr_can_access_subdword(instr)) return false; + if (!rc.is_subdword() && reg.byte()) + return false; uint32_t size = rc.size(); uint32_t stride = 1; -- 2.30.2