Mesa (staging/20.2): aco: ignore the ACO-inserted continue in create_continue_phis()

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Nov 2 16:09:39 UTC 2020


Module: Mesa
Branch: staging/20.2
Commit: 562e89ff0de456f85e3fd85741636f74087d73b3
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=562e89ff0de456f85e3fd85741636f74087d73b3

Author: Rhys Perry <pendingchaos02 at gmail.com>
Date:   Wed Oct 14 21:42:01 2020 +0100

aco: ignore the ACO-inserted continue in create_continue_phis()

Otherwise, for loops without continue_or_break, create_continue_phis()
always returns an undef operand.

Signed-off-by: Rhys Perry <pendingchaos02 at gmail.com>
Reviewed-by: Daniel Schürmann <daniel at schuermann.dev>
Fixes: 638cbc21a1c ("aco: handle when ACO adds new continue edges")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2848
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7148>
(cherry picked from commit 26e53e3afa7ee971fc0e686d2d00c5941264be1f)

---

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

diff --git a/.pick_status.json b/.pick_status.json
index fb4a52a8930..b49b654e485 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -1300,7 +1300,7 @@
         "description": "aco: ignore the ACO-inserted continue in create_continue_phis()",
         "nominated": true,
         "nomination_type": 1,
-        "resolution": 0,
+        "resolution": 1,
         "master_sha": null,
         "because_sha": "638cbc21a1c01c87f620edc820e913e48aba2287"
     },
diff --git a/src/amd/compiler/aco_instruction_selection.cpp b/src/amd/compiler/aco_instruction_selection.cpp
index 8b716841710..c2a8ab675eb 100644
--- a/src/amd/compiler/aco_instruction_selection.cpp
+++ b/src/amd/compiler/aco_instruction_selection.cpp
@@ -9431,7 +9431,7 @@ static Operand create_continue_phis(isel_context *ctx, unsigned first, unsigned
          continue;
       }
 
-      if (block.kind & block_kind_continue) {
+      if ((block.kind & block_kind_continue) && block.index != last) {
          vals[idx - first] = header_phi->operands[next_pred];
          next_pred++;
          continue;



More information about the mesa-commit mailing list