pan/midgard: Fix corner case in RA
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Tue, 27 Aug 2019 20:15:12 +0000 (13:15 -0700)
committerAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Fri, 30 Aug 2019 22:50:24 +0000 (15:50 -0700)
It doesn't really matter but... meh.

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

index 9125d0f03925e5c173d583d8b57d9390f0cd61c7..02b76d6a9874270d2cd20440022d95613d18694b 100644 (file)
@@ -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));