aco: consider blocks unreachable if they are in the logical cfg
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 <pendingchaos02@gmail.com>
Fixes: 8d8c864beb
('aco: improve check for unreachable loop continue blocks')
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4764>
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user