ir3: Validate that ir3_register::instr is correct
authorConnor Abbott <cwabbott0@gmail.com>
Fri, 18 Jun 2021 10:49:05 +0000 (12:49 +0200)
committerMarge Bot <eric+marge@anholt.net>
Wed, 23 Jun 2021 17:20:29 +0000 (17:20 +0000)
Catch the mistake fixed in the previous commit.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11469>

src/freedreno/ir3/ir3_validate.c

index 68e931d..7100cb3 100644 (file)
@@ -121,6 +121,9 @@ validate_reg(struct ir3_validate_ctx *ctx, struct ir3_instruction *instr,
                }
                validate_assert(ctx, found && "tied register not in the same instruction");
        }
+
+       if ((reg->flags & IR3_REG_DEST) && (reg->flags & IR3_REG_SSA))
+               validate_assert(ctx, reg->instr == instr);
 }
 
 #define validate_reg_size(ctx, reg, type) \