glsl: remove unreachable assert()
authorEmil Velikov <emil.velikov@collabora.com>
Wed, 28 Mar 2018 17:21:59 +0000 (18:21 +0100)
committerEmil Velikov <emil.l.velikov@gmail.com>
Tue, 10 Apr 2018 15:04:50 +0000 (16:04 +0100)
Earlier commit enforced that we'll bail out if the number of terminators
is different than 2. With that in mind, the assert() will never trigger.

Fixes: 56b867395de ("glsl: fix infinite loop caused by bug in loop
unrolling pass")
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
src/compiler/glsl/loop_unroll.cpp

index f6efe6475a0829df9a8ac96a71c78af335260ffd..874f4185681d1a44d866b64930f3f30beb4a60c2 100644 (file)
@@ -528,8 +528,6 @@ loop_unroll_visitor::visit_leave(ir_loop *ir)
    unsigned term_count = 0;
    bool first_term_then_continue = false;
    foreach_in_list(loop_terminator, t, &ls->terminators) {
-      assert(term_count < 2);
-
       ir_if *ir_if = t->ir->as_if();
       assert(ir_if != NULL);