aco: check alignment of non-subdword registers in get_reg_specified()

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>
This commit is contained in:
Rhys Perry 2020-04-27 17:54:49 +01:00 committed by Marge Bot
parent 916cc3e231
commit fb59ed6bb9
1 changed files with 2 additions and 0 deletions

View 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;