pan/bi: Don't print types for unconditional branches
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Thu, 5 Mar 2020 21:30:58 +0000 (16:30 -0500)
committerMarge Bot <eric+marge@anholt.net>
Sat, 7 Mar 2020 00:37:39 +0000 (00:37 +0000)
There's nothing to type!

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4097>

src/panfrost/bifrost/bi_print.c

index 81b0f4aa0fce3f8680546c07e97fd10a2ccbe38c..68cbbedbb8286fd28d5b231c645f1090c02425aa 100644 (file)
@@ -317,9 +317,11 @@ bi_print_instruction(bi_instruction *ins, FILE *fp)
                 if (bi_is_src_swizzled(ins, s))
                         bi_print_swizzle(ins, fp);
 
-                if (ins->type == BI_CONVERT && s == 0)
-                        bi_print_alu_type(ins->src_types[s], fp);
-                else if ((ins->type == BI_BRANCH || ins->type == BI_CSEL) && s < 2)
+                bool is_convert = ins->type == BI_CONVERT && s == 0;
+                bool is_branch = ins->type == BI_BRANCH && s < 2 && ins->branch.cond != BI_COND_ALWAYS;
+                bool is_csel = ins->type == BI_CSEL && s < 2;
+
+                if (is_convert || is_branch || is_csel)
                         bi_print_alu_type(ins->src_types[s], fp);
 
                 if (s < BIR_SRC_COUNT)