diff options
author | Rhys Perry <pendingchaos02@gmail.com> | 2020-04-27 13:53:59 +0100 |
---|---|---|
committer | Dylan Baker <dylan.c.baker@intel.com> | 2020-05-06 19:29:30 -0700 |
commit | 58653838f55031176796cb5843cc2a1f91a8f464 (patch) | |
tree | 5d0d74406ae969c0020ab829aed4374669da8e9e | |
parent | 7d0019085941712eb6afe110866ee078a205e94d (diff) |
aco: consider blocks unreachable if they are in the logical cfg
backport of 9392ddab4399d796fdf37602f586965ec17f2b2a
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4888>
-rw-r--r-- | src/amd/compiler/aco_instruction_selection.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/amd/compiler/aco_instruction_selection.cpp b/src/amd/compiler/aco_instruction_selection.cpp index 0b69eb51c89..7f0b9148daa 100644 --- a/src/amd/compiler/aco_instruction_selection.cpp +++ b/src/amd/compiler/aco_instruction_selection.cpp @@ -8276,7 +8276,6 @@ static bool visit_if(isel_context *ctx, nir_if *if_stmt) ctx->block = ctx->program->insert_block(std::move(BB_endif)); append_logical_start(ctx->block); } - return !ctx->cf_info.has_branch; } else { /* non-uniform condition */ /** * To maintain a logical and linear CFG without critical edges, @@ -8312,9 +8311,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, |