panfrost/midgard: Don't promote non-SSA to pipeline registers
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Tue, 4 Jun 2019 21:35:47 +0000 (21:35 +0000)
committerAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Wed, 5 Jun 2019 00:12:36 +0000 (00:12 +0000)
Fixes: 33800f4612 ("panfrost/midgard: Implement "pipeline register"
prepass")

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
src/gallium/drivers/panfrost/midgard/midgard_ra_pipeline.c

index 4de1b910d852899850f4b90c4fb76553adcc84d3..07952b63ffc526271aafba09c0b6f4620c1ca3e5 100644 (file)
@@ -52,7 +52,9 @@ mir_pipeline_ins(
         if (ins->compact_branch)
                 return false;
 
-        if ((dest < 0) || (dest >= SSA_FIXED_MINIMUM))
+        /* Don't allow non-SSA. Pipelining registers is theoretically possible,
+         * but the analysis is much hairier, so don't bother quite yet */
+        if ((dest < 0) || (dest >= ctx->func->impl->ssa_alloc))
                 return false;
 
         /* We want to know if we live after this bundle, so check if