aco: check alignment of non-subdword registers in get_reg_specified()
authorRhys Perry <pendingchaos02@gmail.com>
Mon, 27 Apr 2020 16:54:49 +0000 (17:54 +0100)
committerMarge Bot <eric+marge@anholt.net>
Tue, 28 Apr 2020 23:16:55 +0000 (23:16 +0000)
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 <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4772>

src/amd/compiler/aco_register_allocation.cpp

index 02d4e9f8781405dbb425518f182f8d6fa2f5b153..595be51ccd1912c2e8f4e8771d35539a52cc8451 100644 (file)
@@ -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;