From b34eb94d9c97a7bfdd64da444dcc0860f6546f89 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Wed, 27 May 2020 18:09:44 -0400 Subject: [PATCH] pan/bi: Allow printing branches without targets Useful for debugging codegen. Signed-off-by: Alyssa Rosenzweig Part-of: --- src/panfrost/bifrost/bi_print.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/panfrost/bifrost/bi_print.c b/src/panfrost/bifrost/bi_print.c index 7a3d429767b..681075c6c7e 100644 --- a/src/panfrost/bifrost/bi_print.c +++ b/src/panfrost/bifrost/bi_print.c @@ -402,8 +402,11 @@ bi_print_instruction(bi_instruction *ins, FILE *fp) } if (ins->type == BI_BRANCH) { - assert(ins->branch_target); - fprintf(fp, "-> block%u", ins->branch_target->base.name); + if (ins->branch_target) { + fprintf(fp, "-> block%u", ins->branch_target->base.name); + } else { + fprintf(fp, "-> void"); + } } else if (ins->type == BI_TEX) { bi_print_texture(&ins->texture, fp); } -- 2.30.2