From 1a5444b90013213fa1f1108dc74e17c5e596e5a0 Mon Sep 17 00:00:00 2001 From: Rhys Perry Date: Wed, 5 Aug 2020 13:29:58 +0100 Subject: [PATCH] aco: don't consider the first partial spill if it's the wrong type MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Rhys Perry Reviewed-by: Daniel Schürmann Cc: 20.2 Part-of: --- src/amd/compiler/aco_spill.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/amd/compiler/aco_spill.cpp b/src/amd/compiler/aco_spill.cpp index 9609d639fb3..45c67469d94 100644 --- a/src/amd/compiler/aco_spill.cpp +++ b/src/amd/compiler/aco_spill.cpp @@ -647,8 +647,8 @@ RegisterDemand init_live_in_vars(spill_ctx& ctx, Block* block, unsigned block_id assert(!partial_spills.empty()); std::set::iterator it = partial_spills.begin(); - Temp to_spill = *it; - unsigned distance = ctx.next_use_distances_start[block_idx][*it].second; + Temp to_spill = Temp(); + unsigned distance = 0; while (it != partial_spills.end()) { assert(ctx.spills_entry[block_idx].find(*it) == ctx.spills_entry[block_idx].end()); @@ -670,8 +670,8 @@ RegisterDemand init_live_in_vars(spill_ctx& ctx, Block* block, unsigned block_id assert(!partial_spills.empty()); std::set::iterator it = partial_spills.begin(); - Temp to_spill = *it; - unsigned distance = ctx.next_use_distances_start[block_idx][*it].second; + Temp to_spill = Temp(); + unsigned distance = 0; while (it != partial_spills.end()) { assert(ctx.spills_entry[block_idx].find(*it) == ctx.spills_entry[block_idx].end()); -- 2.30.2