ir3/ra: Don't demote movmsk instructions to non-shared

It only supports shared register destinations.

Fixes: fa22b0901a ("ir3/ra: Add specialized shared register RA/spilling")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22075>
This commit is contained in:
Connor Abbott 2024-02-29 07:32:28 -05:00 committed by Marge Bot
parent 79c89a3670
commit dbeeec2570

View file

@ -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;