agx: fix insidious ballot optimizer bug

see next test.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29861>
This commit is contained in:
Alyssa Rosenzweig
2024-06-17 17:56:00 -04:00
parent 8d210ae232
commit 6628f24e4d
+3
View File
@@ -376,6 +376,9 @@ agx_optimizer_cmpsel(agx_instr **defs, agx_instr *I)
static void
agx_optimizer_ballot(agx_context *ctx, agx_instr **defs, agx_instr *I)
{
if (I->src[0].type != AGX_INDEX_NORMAL)
return;
agx_instr *def = defs[I->src[0].value];
if (!def || (def->op != AGX_OPCODE_ICMP && def->op != AGX_OPCODE_FCMP))
return;