From a6ccbf48e98f3cd85913b00fa191255ca307a600 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Mon, 26 Jul 2021 18:22:03 -0400 Subject: [PATCH] pan/bi: Clarify the logic of bi_reconverge_branches Signed-off-by: Alyssa Rosenzweig Part-of: --- src/panfrost/bifrost/bir.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/panfrost/bifrost/bir.c b/src/panfrost/bifrost/bir.c index 7444d2e4dd0..fa45ee7d1f1 100644 --- a/src/panfrost/bifrost/bir.c +++ b/src/panfrost/bifrost/bir.c @@ -197,10 +197,10 @@ bi_reconverge_branches(bi_block *block) if (block->successors[1]) return true; + /* Must have at least one successor */ struct bi_block *succ = block->successors[0]; assert(succ->predecessors); - unsigned count = succ->predecessors->entries; - /* Reconverge if there are multiple predecessors */ - return (count != 1); + /* Reconverge if the successor has multiple predecessors */ + return (succ->predecessors->entries > 1); }