From fe90bcf11ae384fcb8a5ad9642e6e51db1e86816 Mon Sep 17 00:00:00 2001 From: Jesse Natalie Date: Mon, 8 Mar 2021 11:56:55 -0800 Subject: [PATCH] microsoft/compiler: Don't separate phis while inserting upcasts Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4414 Reviewed-by: Jason Ekstrand Part-of: --- src/microsoft/compiler/dxil_nir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/microsoft/compiler/dxil_nir.c b/src/microsoft/compiler/dxil_nir.c index c1cafff..599cb5b 100644 --- a/src/microsoft/compiler/dxil_nir.c +++ b/src/microsoft/compiler/dxil_nir.c @@ -1063,7 +1063,7 @@ cast_phi(nir_builder *b, nir_phi_instr *phi, unsigned new_bit_size) assert(num_components == 0 || num_components == src->src.ssa->num_components); num_components = src->src.ssa->num_components; - b->cursor = nir_after_instr(src->src.ssa->parent_instr); + b->cursor = nir_after_instr_and_phis(src->src.ssa->parent_instr); nir_ssa_def *cast = nir_build_alu(b, upcast_op, src->src.ssa, NULL, NULL, NULL); -- 2.7.4