From 8bf3213a5465c9079f2cd0176c7c1766c4472175 Mon Sep 17 00:00:00 2001 From: Faith Ekstrand Date: Tue, 23 Jul 2024 14:13:12 -0500 Subject: [PATCH] nak/spill_values: Don't assume no trivial phis Thanks to LCSSA, we can absolutely have phis with only one source and we need to handle those in spilling. Fortunately, there's nothing really special about that case. I was just prematurely optimizing. Fixes: bcad2add4735 ("nak: Add a spilling pass") Part-of: --- src/nouveau/compiler/nak/spill_values.rs | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/nouveau/compiler/nak/spill_values.rs b/src/nouveau/compiler/nak/spill_values.rs index 8b4454b23a3..5de86c0d9da 100644 --- a/src/nouveau/compiler/nak/spill_values.rs +++ b/src/nouveau/compiler/nak/spill_values.rs @@ -899,14 +899,6 @@ fn spill_values( } let s_idx = succ[0]; - // If blocks[p_idx] is the unique predecessor of blocks[s_idx] then the - // spill/fill sets for blocks[s_idx] are just those from blocks[p_idx], - // filtered for liveness and there is no phi source. There's nothing - // for us to do here. - if blocks.pred_indices(s_idx).len() == 1 { - continue; - } - let pb = &mut blocks[p_idx]; let p_out = &ssa_state_out[p_idx]; let s_in = &ssa_state_in[s_idx];