[Mesa-stable] [PATCH] nir: Fix end of function without return warning/error.

Bas Nieuwenhuizen bas at basnieuwenhuizen.nl
Fri Jul 20 17:59:30 UTC 2018


There always is a continue block, so let us just do unreachable.

Fixes: 8cacf38f527 "nir: Do not use continue block after removing it."
CC: 18.1 <mesa-stable at lists.freedesktop.org>
CC: Mark Janes <mark.a.janes at intel.com>
---
 src/compiler/nir/nir_opt_if.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/compiler/nir/nir_opt_if.c b/src/compiler/nir/nir_opt_if.c
index 49ba5de09e9..b3d0bf1decb 100644
--- a/src/compiler/nir/nir_opt_if.c
+++ b/src/compiler/nir/nir_opt_if.c
@@ -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!");
 }
 
 /**
-- 
2.18.0



More information about the mesa-stable mailing list