nvir: run replaceZero() before replaceCvt()

replaceCvt() will miss some cases otherwise.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5377>
This commit is contained in:
Ben Skeggs 2020-06-09 09:52:47 +10:00 committed by Marge Bot
parent 7dbb7572e2
commit a2420c2280

View file

@ -867,11 +867,11 @@ NVC0LegalizePostRA::visit(BasicBlock *bb)
next = hi;
}
if (i->op == OP_SAT || i->op == OP_NEG || i->op == OP_ABS)
replaceCvt(i);
if (i->op != OP_MOV && i->op != OP_PFETCH)
replaceZero(i);
if (i->op == OP_SAT || i->op == OP_NEG || i->op == OP_ABS)
replaceCvt(i);
}
}
if (!bb->getEntry())