Mesa (staging/20.0): aco: Fix signed-vs-unsigned warning.

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Feb 28 22:44:48 UTC 2020


Module: Mesa
Branch: staging/20.0
Commit: a14b7adabd370acb7aed43ba66e0ddabd3cf8399
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=a14b7adabd370acb7aed43ba66e0ddabd3cf8399

Author: Eric Anholt <eric at anholt.net>
Date:   Tue Feb  4 15:12:18 2020 -0800

aco: Fix signed-vs-unsigned warning.

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 at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3607>
(cherry picked from commit b9773631d3e79e2310ed0eb274b4dd9426205066)

---

 .pick_status.json                         | 2 +-
 src/amd/compiler/aco_insert_exec_mask.cpp | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/.pick_status.json b/.pick_status.json
index 9a7e8ba6a85..dbb9db6dc30 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -472,7 +472,7 @@
         "description": "aco: Fix signed-vs-unsigned warning.",
         "nominated": true,
         "nomination_type": 1,
-        "resolution": 0,
+        "resolution": 1,
         "master_sha": null,
         "because_sha": "dba71de5c63617677fe44558f995d35fad643413"
     },
diff --git a/src/amd/compiler/aco_insert_exec_mask.cpp b/src/amd/compiler/aco_insert_exec_mask.cpp
index 37a994cd4df..527d63627e0 100644
--- a/src/amd/compiler/aco_insert_exec_mask.cpp
+++ b/src/amd/compiler/aco_insert_exec_mask.cpp
@@ -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;
             }



More information about the mesa-commit mailing list