From 9392ddab4399d796fdf37602f586965ec17f2b2a Mon Sep 17 00:00:00 2001 From: Rhys Perry Date: Mon, 27 Apr 2020 13:53:59 +0100 Subject: [PATCH] aco: consider blocks unreachable if they are in the logical cfg MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit unreachable was true if the last block is unreachable in the linear cfg, but it should also be true if it is unreachable in the logical cfg. Fixes dEQP-VK.graphicsfuzz.for-with-ifs-and-return Signed-off-by: Rhys Perry Fixes: 8d8c864beba399ae4ee2267f680d1f600ad32767 ('aco: improve check for unreachable loop continue blocks') Reviewed-by: Daniel Schürmann Part-of: --- .gitlab-ci/deqp-radv-fiji-aco-fails.txt | 1 - .gitlab-ci/deqp-radv-navi10-aco-fails.txt | 1 - .gitlab-ci/deqp-radv-pitcairn-aco-fails.txt | 1 - .gitlab-ci/deqp-radv-polaris10-aco-fails.txt | 1 - .gitlab-ci/deqp-radv-vega10-aco-fails.txt | 1 - src/amd/compiler/aco_instruction_selection.cpp | 6 ++---- 6 files changed, 2 insertions(+), 9 deletions(-) diff --git a/.gitlab-ci/deqp-radv-fiji-aco-fails.txt b/.gitlab-ci/deqp-radv-fiji-aco-fails.txt index 0e5af2dd7e1..66b11f7b7b2 100644 --- a/.gitlab-ci/deqp-radv-fiji-aco-fails.txt +++ b/.gitlab-ci/deqp-radv-fiji-aco-fails.txt @@ -12,7 +12,6 @@ dEQP-VK.glsl.builtin.precision.asin.highp.vec4 dEQP-VK.info.device_extensions # ACO specific issues. -dEQP-VK.graphicsfuzz.for-with-ifs-and-return dEQP-VK.graphicsfuzz.loops-ifs-continues-call # Interesting failures... diff --git a/.gitlab-ci/deqp-radv-navi10-aco-fails.txt b/.gitlab-ci/deqp-radv-navi10-aco-fails.txt index 8c7d6e5af77..fb0bfc9e184 100644 --- a/.gitlab-ci/deqp-radv-navi10-aco-fails.txt +++ b/.gitlab-ci/deqp-radv-navi10-aco-fails.txt @@ -10,5 +10,4 @@ dEQP-VK.info.device_extensions # ACO specific issues. dEQP-VK.transform_feedback.simple.multistreams_1 dEQP-VK.transform_feedback.simple.multistreams_3 -dEQP-VK.graphicsfuzz.for-with-ifs-and-return dEQP-VK.graphicsfuzz.loops-ifs-continues-call diff --git a/.gitlab-ci/deqp-radv-pitcairn-aco-fails.txt b/.gitlab-ci/deqp-radv-pitcairn-aco-fails.txt index fc2a282988b..1a9895fbda1 100644 --- a/.gitlab-ci/deqp-radv-pitcairn-aco-fails.txt +++ b/.gitlab-ci/deqp-radv-pitcairn-aco-fails.txt @@ -8,5 +8,4 @@ dEQP-VK.glsl.builtin.precision.asin.highp.vec4 dEQP-VK.info.device_extensions # ACO specific issues. -dEQP-VK.graphicsfuzz.for-with-ifs-and-return dEQP-VK.graphicsfuzz.loops-ifs-continues-call diff --git a/.gitlab-ci/deqp-radv-polaris10-aco-fails.txt b/.gitlab-ci/deqp-radv-polaris10-aco-fails.txt index af0dd059b15..dd4f00a7166 100644 --- a/.gitlab-ci/deqp-radv-polaris10-aco-fails.txt +++ b/.gitlab-ci/deqp-radv-polaris10-aco-fails.txt @@ -12,5 +12,4 @@ dEQP-VK.glsl.builtin.precision.asin.highp.vec4 dEQP-VK.info.device_extensions # ACO specific issues. -dEQP-VK.graphicsfuzz.for-with-ifs-and-return dEQP-VK.graphicsfuzz.loops-ifs-continues-call diff --git a/.gitlab-ci/deqp-radv-vega10-aco-fails.txt b/.gitlab-ci/deqp-radv-vega10-aco-fails.txt index 8c7d6e5af77..fb0bfc9e184 100644 --- a/.gitlab-ci/deqp-radv-vega10-aco-fails.txt +++ b/.gitlab-ci/deqp-radv-vega10-aco-fails.txt @@ -10,5 +10,4 @@ dEQP-VK.info.device_extensions # ACO specific issues. dEQP-VK.transform_feedback.simple.multistreams_1 dEQP-VK.transform_feedback.simple.multistreams_3 -dEQP-VK.graphicsfuzz.for-with-ifs-and-return dEQP-VK.graphicsfuzz.loops-ifs-continues-call diff --git a/src/amd/compiler/aco_instruction_selection.cpp b/src/amd/compiler/aco_instruction_selection.cpp index 16d76be03c9..b13b2372f4b 100644 --- a/src/amd/compiler/aco_instruction_selection.cpp +++ b/src/amd/compiler/aco_instruction_selection.cpp @@ -9552,8 +9552,6 @@ static bool visit_if(isel_context *ctx, nir_if *if_stmt) visit_cf_list(ctx, &if_stmt->else_list); end_uniform_if(ctx, &ic); - - return !ctx->cf_info.has_branch; } else { /* non-uniform condition */ /** * To maintain a logical and linear CFG without critical edges, @@ -9587,9 +9585,9 @@ static bool visit_if(isel_context *ctx, nir_if *if_stmt) visit_cf_list(ctx, &if_stmt->else_list); end_divergent_if(ctx, &ic); - - return true; } + + return !ctx->cf_info.has_branch && !ctx->block->logical_preds.empty(); } static bool visit_cf_list(isel_context *ctx, -- 2.30.2