From 0c0819f0da49b38c980a8e4a42aca1e89d40b984 Mon Sep 17 00:00:00 2001 From: Rhys Perry Date: Fri, 15 Mar 2024 11:57:50 +0000 Subject: [PATCH] aco/cssa: reset equal_anc_out if merging fails MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit try_merge_merge_set() expects equal_anc_out to be Temp() in the beginning, so we need to reset it in case it's used again. Fixes compilation of metro_exodus/163b3b895730d37b with VK_PIPELINE_CREATE_2_DISABLE_OPTIMIZATION_BIT_KHR. Signed-off-by: Rhys Perry Reviewed-by: Daniel Schürmann Fixes: 18ba93e6732a ("aco/cssa: rewrite lower_to_cssa pass") Part-of: --- src/amd/compiler/aco_lower_to_cssa.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/amd/compiler/aco_lower_to_cssa.cpp b/src/amd/compiler/aco_lower_to_cssa.cpp index 7b9eb3be15a..c4eb542f03c 100644 --- a/src/amd/compiler/aco_lower_to_cssa.cpp +++ b/src/amd/compiler/aco_lower_to_cssa.cpp @@ -305,8 +305,11 @@ try_merge_merge_set(cssa_ctx& ctx, Temp dst, merge_set& set_b) while (!dom.empty() && !dominates(ctx, dom.back(), current)) dom.pop_back(); /* not the desired parent, remove */ - if (!dom.empty() && interference(ctx, current, dom.back())) + if (!dom.empty() && interference(ctx, current, dom.back())) { + for (Temp t : union_set) + ctx.merge_node_table[t.id()].equal_anc_out = Temp(); return false; /* intersection detected */ + } dom.emplace_back(current); /* otherwise, keep checking */ if (current != dst)