aco: don't move create_vector subdword operands to unsupported register offsets
authorDaniel Schürmann <daniel@schuermann.dev>
Fri, 8 May 2020 15:18:15 +0000 (16:18 +0100)
committerMarge Bot <eric+marge@anholt.net>
Thu, 21 May 2020 12:07:40 +0000 (12:07 +0000)
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5070>

src/amd/compiler/aco_register_allocation.cpp

index 07b5130aa63f31be1bb16c6aee261106f28a9781..d296e61de502891d42f9632bbafdc92acd14a77d 100644 (file)
@@ -551,7 +551,7 @@ bool get_regs_for_copies(ra_ctx& ctx,
                   PhysReg reg(def_reg_lo);
                   reg.reg_b += offset;
                   assert(!reg_file.test(reg, var.rc.bytes()));
-                  res = {reg, true};
+                  res = {reg, reg.byte() == 0 || instr_can_access_subdword(ctx, instr)};
                   break;
                }
             }