From bfa9f56a2a9637842e2012fd00968241bb0311ab Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Tue, 4 Jun 2019 21:35:47 +0000 Subject: [PATCH] panfrost/midgard: Don't promote non-SSA to pipeline registers Fixes: 33800f4612 ("panfrost/midgard: Implement "pipeline register" prepass") Signed-off-by: Alyssa Rosenzweig --- src/gallium/drivers/panfrost/midgard/midgard_ra_pipeline.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/panfrost/midgard/midgard_ra_pipeline.c b/src/gallium/drivers/panfrost/midgard/midgard_ra_pipeline.c index 4de1b910d85..07952b63ffc 100644 --- a/src/gallium/drivers/panfrost/midgard/midgard_ra_pipeline.c +++ b/src/gallium/drivers/panfrost/midgard/midgard_ra_pipeline.c @@ -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 -- 2.30.2