summaryrefslogtreecommitdiff
path: root/src/compiler/nir/nir_opt_if.c
diff options
context:
space:
mode:
authorDaniel Schürmann <daniel@schuermann.dev>2021-12-02 10:31:56 +0100
committerMarge Bot <emma+marge@anholt.net>2023-02-21 10:41:11 +0000
commit2bb369dd8d4061cdb5c51e9eb101c4e63a6209f6 (patch)
tree23f71a0a4b5a95c319065c5b8aa0761e76854053 /src/compiler/nir/nir_opt_if.c
parentd4b97bf3fa587d9636f2d78b54e998203dc1d680 (diff)
downloadmesa-2bb369dd8d4061cdb5c51e9eb101c4e63a6209f6.tar.gz
nir: add assertions that loops don't have a Continue Construct
Hoping that I didn't miss any, this *should* add assertions to all functions and passes which explicitly handle 'nir_loop'. Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13962>
Diffstat (limited to 'src/compiler/nir/nir_opt_if.c')
-rw-r--r--src/compiler/nir/nir_opt_if.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/compiler/nir/nir_opt_if.c b/src/compiler/nir/nir_opt_if.c
index 142e0ef3d95..3711c15959e 100644
--- a/src/compiler/nir/nir_opt_if.c
+++ b/src/compiler/nir/nir_opt_if.c
@@ -1621,6 +1621,7 @@ opt_if_cf_list(nir_builder *b, struct exec_list *cf_list,
case nir_cf_node_loop: {
nir_loop *loop = nir_cf_node_as_loop(cf_node);
+ assert(!nir_loop_has_continue_construct(loop));
progress |= opt_if_cf_list(b, &loop->body,
options);
progress |= opt_simplify_bcsel_of_phi(b, loop);
@@ -1666,6 +1667,7 @@ opt_if_regs_cf_list(struct exec_list *cf_list)
case nir_cf_node_loop: {
nir_loop *loop = nir_cf_node_as_loop(cf_node);
+ assert(!nir_loop_has_continue_construct(loop));
progress |= opt_if_regs_cf_list(&loop->body);
progress |= opt_peel_loop_initial_if(loop);
break;
@@ -1704,6 +1706,7 @@ opt_if_safe_cf_list(nir_builder *b, struct exec_list *cf_list)
case nir_cf_node_loop: {
nir_loop *loop = nir_cf_node_as_loop(cf_node);
+ assert(!nir_loop_has_continue_construct(loop));
progress |= opt_if_safe_cf_list(b, &loop->body);
progress |= opt_split_alu_of_phi(b, loop);
break;