aco: fix register allocation for subdword instructions on GFX10
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Fri, 29 May 2020 08:02:39 +0000 (10:02 +0200)
committerMarge Bot <eric+marge@anholt.net>
Fri, 29 May 2020 11:20:58 +0000 (11:20 +0000)
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>

src/amd/compiler/aco_register_allocation.cpp

index c4d5a48293273bb02f110788fd7fbe726f2d438b..eca7008bc519fcf09140a7dfb0c9fb0b0b5664aa 100644 (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);
                }