From dce680737ddb200c59c55a8c696114f793757398 Mon Sep 17 00:00:00 2001 From: Connor Abbott Date: Fri, 18 Jun 2021 12:49:05 +0200 Subject: [PATCH] ir3: Validate that ir3_register::instr is correct Catch the mistake fixed in the previous commit. Part-of: --- src/freedreno/ir3/ir3_validate.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/freedreno/ir3/ir3_validate.c b/src/freedreno/ir3/ir3_validate.c index 68e931dd619..7100cb392f7 100644 --- a/src/freedreno/ir3/ir3_validate.c +++ b/src/freedreno/ir3/ir3_validate.c @@ -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) \