aco: fix neighboring register check in get_reg_simple()
authorRhys Perry <pendingchaos02@gmail.com>
Mon, 27 Apr 2020 17:15:23 +0000 (18:15 +0100)
committerMarge Bot <eric+marge@anholt.net>
Tue, 28 Apr 2020 23:16:55 +0000 (23:16 +0000)
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>

src/amd/compiler/aco_register_allocation.cpp

index 595be51ccd1912c2e8f4e8771d35539a52cc8451..7fd15295ea8821ada780e6114ac4d7f7b2abfa16 100644 (file)
@@ -381,7 +381,7 @@ std::pair<PhysReg, bool> get_reg_simple(ra_ctx& ctx,
                reg_found &= entry.second[i + j] == 0;
 
             /* check neighboring reg if needed */
-            reg_found &= (i <= 4 - rc.bytes() || reg_file[entry.first + 1] == 0);
+            reg_found &= ((int)i <= 4 - (int)rc.bytes() || reg_file[entry.first + 1] == 0);
             if (reg_found) {
                PhysReg res{entry.first};
                res.reg_b += i;