aco: Fix signed-vs-unsigned warning.
authorEric Anholt <eric@anholt.net>
Tue, 4 Feb 2020 23:12:18 +0000 (15:12 -0800)
committerEric Anholt <eric@anholt.net>
Fri, 28 Feb 2020 05:59:31 +0000 (21:59 -0800)
The previous instance of this comparision was 1u to avoid the warning, fix
this one too.

Fixes: dba71de5c636 ("aco: only create parallelcopy to restore exec at loop exit if needed")
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3607>

src/amd/compiler/aco_insert_exec_mask.cpp

index 37a994cd4df2763957084e18d5814ba840220ae4..527d63627e089cd9898cbc07055fb5cbed1c9c5a 100644 (file)
@@ -526,7 +526,7 @@ unsigned add_coupling_code(exec_ctx& ctx, Block* block,
             /* create phi for loop footer */
             aco_ptr<Pseudo_instruction> phi{create_instruction<Pseudo_instruction>(aco_opcode::p_linear_phi, Format::PSEUDO, preds.size(), 1)};
             phi->definitions[0] = bld.def(bld.lm);
-            if (k == info.num_exec_masks - 1) {
+            if (k == info.num_exec_masks - 1u) {
                phi->definitions[0].setFixed(exec);
                need_parallelcopy = false;
             }