From 26e53e3afa7ee971fc0e686d2d00c5941264be1f Mon Sep 17 00:00:00 2001 From: Rhys Perry Date: Wed, 14 Oct 2020 21:42:01 +0100 Subject: [PATCH] aco: ignore the ACO-inserted continue in create_continue_phis() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Otherwise, for loops without continue_or_break, create_continue_phis() always returns an undef operand. Signed-off-by: Rhys Perry Reviewed-by: Daniel Schürmann Fixes: 638cbc21a1c ("aco: handle when ACO adds new continue edges") Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2848 Part-of: --- src/amd/compiler/aco_instruction_selection.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/amd/compiler/aco_instruction_selection.cpp b/src/amd/compiler/aco_instruction_selection.cpp index 3111d7f8b76..677fac16ab7 100644 --- a/src/amd/compiler/aco_instruction_selection.cpp +++ b/src/amd/compiler/aco_instruction_selection.cpp @@ -9584,7 +9584,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;