From 7793c9ab024e9a97e36bd7b126ca8ca7d3e195c9 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Wed, 5 May 2021 12:51:30 -0400 Subject: [PATCH] pan/bi: Adapt branching for 1-bit bools Signed-off-by: Alyssa Rosenzweig Part-of: --- src/panfrost/bifrost/bifrost_compile.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/panfrost/bifrost/bifrost_compile.c b/src/panfrost/bifrost/bifrost_compile.c index dffc75a..10800c3 100644 --- a/src/panfrost/bifrost/bifrost_compile.c +++ b/src/panfrost/bifrost/bifrost_compile.c @@ -2670,8 +2670,9 @@ emit_if(bi_context *ctx, nir_if *nif) /* Speculatively emit the branch, but we can't fill it in until later */ bi_builder _b = bi_init_builder(ctx, bi_after_block(ctx->current_block)); - bi_instr *then_branch = bi_branchz_i32(&_b, - bi_src_index(&nif->condition), bi_zero(), BI_CMPF_EQ); + bi_instr *then_branch = bi_branchz_i16(&_b, + bi_half(bi_src_index(&nif->condition), false), + bi_zero(), BI_CMPF_EQ); /* Emit the two subblocks. */ bi_block *then_block = emit_cf_list(ctx, &nif->then_list); -- 2.7.4