aco: fix register allocation for subdword instructions on GFX10

Cc: 20.1 <mesa-stable@lists.freedesktop.org>
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5148>
This commit is contained in:
Samuel Pitoiset 2020-05-29 10:02:39 +02:00 committed by Marge Bot
parent ad609bf55a
commit 75a730ced5
1 changed files with 1 additions and 3 deletions

View File

@ -1898,10 +1898,8 @@ void register_allocation(Program *program, std::vector<TempSet>& live_out_per_bl
if (!definition.isFixed()) {
Temp tmp = definition.getTemp();
/* subdword instructions before RDNA write full registers */
if (tmp.regClass().is_subdword() &&
!instr_can_access_subdword(ctx, instr) &&
ctx.program->chip_class <= GFX9) {
!instr_can_access_subdword(ctx, instr)) {
assert(tmp.bytes() <= 4);
tmp = Temp(definition.tempId(), v1);
}