From a2420c2280f32d3c36b39522d1d3555fe5627d23 Mon Sep 17 00:00:00 2001 From: Ben Skeggs Date: Tue, 9 Jun 2020 09:52:47 +1000 Subject: [PATCH] nvir: run replaceZero() before replaceCvt() replaceCvt() will miss some cases otherwise. Signed-off-by: Ben Skeggs Reviewed-by: Karol Herbst Part-of: --- .../drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp index ccdc2f98ef6..8e6b9775d79 100644 --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp @@ -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()) -- 2.30.2