From 746a0f502ae0be3b755946dbaed0e66ee154c41e Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Tue, 22 Dec 2020 12:18:28 -0800 Subject: [PATCH] gallium/ntt: Fix check for "is there anything in the else block?" The cf list will always be non-empty, with at least a block in it. Noticed while checking codegen of a piglit test that was really slow on softpipe. Reviewed-by: Adam Jackson Part-of: --- src/gallium/auxiliary/nir/nir_to_tgsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/auxiliary/nir/nir_to_tgsi.c b/src/gallium/auxiliary/nir/nir_to_tgsi.c index 1e477de730f..79018fdc21c 100644 --- a/src/gallium/auxiliary/nir/nir_to_tgsi.c +++ b/src/gallium/auxiliary/nir/nir_to_tgsi.c @@ -2053,7 +2053,7 @@ ntt_emit_if(struct ntt_compile *c, nir_if *if_stmt) ureg_UIF(c->ureg, c->if_cond, &label); ntt_emit_cf_list(c, &if_stmt->then_list); - if (!exec_list_is_empty(&if_stmt->else_list)) { + if (!nir_cf_list_is_empty_block(&if_stmt->else_list)) { ureg_fixup_label(c->ureg, label, ureg_get_instruction_number(c->ureg)); ureg_ELSE(c->ureg, &label); ntt_emit_cf_list(c, &if_stmt->else_list);