shader: reject rejoining early-exit routes

This commit is contained in:
nmzik committed 2026-08-21 03:32:48 +02:00
1 parent 2bd9f4124f
commit 7f66a61801
2 files changed
+16 -6

No files matched your search

@@ -1803,7 +1803,8 @@ bool RouteOneSharedArm(Graph& graph, uint32_t original_block_count, uint32_t out
const auto continuation = graph.FindNearestCommonPostDominator(shared, body);
const auto* continuation_block = graph.FindBlock(continuation);
if (continuation_block == nullptr || continuation == other) {
if (continuation_block == nullptr || continuation == other ||
CanReachBefore(graph, other, continuation, UINT32_MAX)) {
continue;
}
std::vector<uint32_t> outer_predecessors;