pan/midgard: De-special-case branching
[mesa.git] / src / panfrost / midgard / midgard_compile.c
index a03740acf7d59ab6389461fba3de6f403a616d14..8126c1e25a6abb572c995a092554a98b9b8c4a05 100644 (file)
@@ -193,7 +193,12 @@ v_alu_br_compact_cond(midgard_jmp_writeout_op op, unsigned tag, signed offset, u
                 .unit = ALU_ENAB_BR_COMPACT,
                 .prepacked_branch = true,
                 .compact_branch = true,
-                .br_compact = compact
+                .br_compact = compact,
+                .ssa_args = {
+                        .dest = -1,
+                        .src0 = -1,
+                        .src1 = -1,
+                }
         };
 
         if (op == midgard_jmp_writeout_op_writeout)
@@ -212,6 +217,11 @@ v_branch(bool conditional, bool invert)
                 .branch = {
                         .conditional = conditional,
                         .invert_conditional = invert
+                },
+                .ssa_args = {
+                        .dest = -1,
+                        .src0 = -1,
+                        .src1 = -1
                 }
         };
 
@@ -1744,9 +1754,6 @@ inline_alu_constants(compiler_context *ctx)
                 /* If there is already a constant here, we can do nothing */
                 if (alu->has_constants) continue;
 
-                /* It makes no sense to inline constants on a branch */
-                if (alu->compact_branch || alu->prepacked_branch) continue;
-
                 CONDITIONAL_ATTACH(src0);
 
                 if (!alu->has_constants) {