nir: Fix end of function without return warning/error.
authorBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Fri, 20 Jul 2018 17:54:56 +0000 (19:54 +0200)
committerBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Fri, 20 Jul 2018 20:27:39 +0000 (22:27 +0200)
There always is a continue block, so let us just do unreachable.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Fixes: 8cacf38f527 "nir: Do not use continue block after removing it."
CC: 18.1 <mesa-stable@lists.freedesktop.org>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107312

src/compiler/nir/nir_opt_if.c

index 49ba5de09e9a287030d28df0c51d9af1504912d9..b3d0bf1decb56cbc954fec19ae00f75482ab39fc 100644 (file)
@@ -44,6 +44,8 @@ find_continue_block(nir_loop *loop)
       if (pred_entry->key != prev_block)
          return (nir_block*)pred_entry->key;
    }
+
+   unreachable("Continue block not found!");
 }
 
 /**