aco: prevent infinite recursion in RA for subdword variables
authorDaniel Schürmann <daniel@schuermann.dev>
Thu, 23 Jul 2020 07:41:07 +0000 (09:41 +0200)
committerMarge Bot <eric+marge@anholt.net>
Thu, 23 Jul 2020 18:18:36 +0000 (18:18 +0000)
Cc: 20.1 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6024>

src/amd/compiler/aco_register_allocation.cpp

index a59a9af7add64501e06bbd023a1c7888f080d674..2fd8d3d66d509fa3807d1274504bec01922d63c1 100644 (file)
@@ -591,7 +591,7 @@ std::pair<PhysReg, bool> get_reg_simple(ra_ctx& ctx,
    RegClass rc = info.rc;
 
    if (stride == 1) {
-
+      info.rc = RegClass(rc.type(), size);
       for (unsigned stride = 8; stride > 1; stride /= 2) {
          if (size % stride)
             continue;