From be4a34966ceefbaf70cecb56a8300a31c5b0ca46 Mon Sep 17 00:00:00 2001 From: Rhys Perry Date: Mon, 27 Apr 2020 18:15:23 +0100 Subject: [PATCH] aco: fix neighboring register check in get_reg_simple() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Rhys Perry Reviewed-by: Daniel Schürmann Part-of: --- src/amd/compiler/aco_register_allocation.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/amd/compiler/aco_register_allocation.cpp b/src/amd/compiler/aco_register_allocation.cpp index 595be51ccd1..7fd15295ea8 100644 --- a/src/amd/compiler/aco_register_allocation.cpp +++ b/src/amd/compiler/aco_register_allocation.cpp @@ -381,7 +381,7 @@ std::pair 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;