diff --git a/src/compiler/nir/nir_opt_if.c b/src/compiler/nir/nir_opt_if.c index d5a6fc12ac7..bab4fb9cfba 100644 --- a/src/compiler/nir/nir_opt_if.c +++ b/src/compiler/nir/nir_opt_if.c @@ -702,7 +702,8 @@ is_block_empty_or_constant(nir_block *block) return false; nir_foreach_instr(instr, block) { - if (instr->type != nir_instr_type_load_const) + if (instr->type != nir_instr_type_load_const && + instr->type != nir_instr_type_undef) return false; }