nir: Remove unnecessary assert in nir_before_src
authorFriedrich Vock <friedrich.vock@gmx.de>
Wed, 12 Apr 2023 15:15:29 +0000 (17:15 +0200)
committerMarge Bot <emma+marge@anholt.net>
Sat, 3 Jun 2023 10:26:02 +0000 (10:26 +0000)
This condition can occur in the wild (more specifically in RT shader
call lowering), and it is handled correctly.

Cc: mesa-stable
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22536>

src/compiler/nir/nir.h

index 07b0f71..0677930 100644 (file)
@@ -4251,7 +4251,6 @@ nir_before_src(nir_src *src)
    if (src->is_if) {
       nir_block *prev_block =
          nir_cf_node_as_block(nir_cf_node_prev(&src->parent_if->cf_node));
-      assert(!nir_block_ends_in_jump(prev_block));
       return nir_after_block(prev_block);
    } else if (src->parent_instr->type == nir_instr_type_phi) {
 #ifndef NDEBUG