pan/midgard: Schedule to smul/sadd
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Sat, 28 Sep 2019 13:48:53 +0000 (09:48 -0400)
committerAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Mon, 30 Sep 2019 12:40:13 +0000 (08:40 -0400)
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
src/panfrost/midgard/midgard_schedule.c

index dfc02f1c33710aa8ad1157db22ad459a740c199d..ddd5edd7c84b72f86b7a149327945ecb736cb9ef 100644 (file)
@@ -753,6 +753,8 @@ mir_schedule_alu(
                         unreachable("Bad condition");
         }
 
+        mir_choose_alu(&smul, instructions, worklist, len, &predicate, UNIT_SMUL);
+
         if (!writeout)
                 mir_choose_alu(&vlut, instructions, worklist, len, &predicate, UNIT_VLUT);
 
@@ -777,6 +779,9 @@ mir_schedule_alu(
                         unreachable("Bad condition");
         }
 
+        /* Stage 2, let's schedule sadd before vmul for writeout */
+        mir_choose_alu(&sadd, instructions, worklist, len, &predicate, UNIT_SADD);
+
         /* Check if writeout reads its own register */
         bool bad_writeout = false;