From: Alyssa Rosenzweig Date: Tue, 27 Aug 2019 20:15:12 +0000 (-0700) Subject: pan/midgard: Fix corner case in RA X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f29d03a1f90a15d7b11e40af5ad41ccf93eb667f;p=mesa.git pan/midgard: Fix corner case in RA It doesn't really matter but... meh. Signed-off-by: Alyssa Rosenzweig --- diff --git a/src/panfrost/midgard/midgard_ra.c b/src/panfrost/midgard/midgard_ra.c index 9125d0f0392..02b76d6a987 100644 --- a/src/panfrost/midgard/midgard_ra.c +++ b/src/panfrost/midgard/midgard_ra.c @@ -141,7 +141,7 @@ static struct phys_reg index_to_reg(compiler_context *ctx, struct ra_graph *g, unsigned reg) { /* Check for special cases */ - if ((reg == ~0) && g) + if (reg == ~0) return default_phys_reg(REGISTER_UNUSED); else if (reg >= SSA_FIXED_MINIMUM) return default_phys_reg(SSA_REG_FROM_FIXED(reg));