From: Rhys Perry Date: Mon, 27 Apr 2020 17:15:23 +0000 (+0100) Subject: aco: fix neighboring register check in get_reg_simple() X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=be4a34966ceefbaf70cecb56a8300a31c5b0ca46;p=mesa.git aco: fix neighboring register check in get_reg_simple() Signed-off-by: Rhys Perry Reviewed-by: Daniel Schürmann Part-of: --- 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;