nir: return false for loops in contains_other_jump()
authorDaniel Schürmann <daniel@schuermann.dev>
Sat, 31 Oct 2020 22:25:12 +0000 (23:25 +0100)
committerMarge Bot <eric+marge@anholt.net>
Thu, 19 Aug 2021 13:51:17 +0000 (13:51 +0000)
Allows to unwrap more loops.

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12473>

src/compiler/nir/nir_loop_analyze.h

index c722946..b095401 100644 (file)
@@ -63,7 +63,8 @@ contains_other_jump(nir_cf_node *node, nir_instr *expected_jump)
       return false;
    }
    case nir_cf_node_loop:
-      return true;
+      /* the jumps of nested loops are unrelated */
+      return false;
 
    default:
       unreachable("Unhandled cf node type");