From dbeeec25704f9c8a43527b04e8088627f2fbc4bb Mon Sep 17 00:00:00 2001 From: Connor Abbott Date: Thu, 29 Feb 2024 07:32:28 -0500 Subject: [PATCH] ir3/ra: Don't demote movmsk instructions to non-shared It only supports shared register destinations. Fixes: fa22b0901af ("ir3/ra: Add specialized shared register RA/spilling") Part-of: --- src/freedreno/ir3/ir3_shared_ra.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/freedreno/ir3/ir3_shared_ra.c b/src/freedreno/ir3/ir3_shared_ra.c index d00198b2a3c..60b2ad3d43c 100644 --- a/src/freedreno/ir3/ir3_shared_ra.c +++ b/src/freedreno/ir3/ir3_shared_ra.c @@ -516,6 +516,13 @@ try_demote_instruction(struct ra_ctx *ctx, struct ir3_instruction *instr) /* First, check restrictions. */ switch (opc_cat(instr->opc)) { case 1: + /* MOVMSK is special and can't be demoted. It also has no sources so must + * go before the check below. + */ + if (instr->opc == OPC_MOVMSK) + return false; + + assert(instr->srcs_count >= 1); if (!(instr->srcs[0]->flags & (IR3_REG_CONST | IR3_REG_IMMED))) return false; break;