[Mesa-dev] [PATCH] nv50/ir: make sure to erase src2 after optimizing to MOV
Samuel Pitoiset
samuel.pitoiset at gmail.com
Wed Nov 9 14:20:01 UTC 2016
For all instructions with 3 sources (like OP_SLCT), src2 needs
to be destroyed because srcExists(2) will return true although
it's actually undefined.
Spotted with my ADD3 series.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
---
src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp
index 9cf6ddc..ef31436 100644
--- a/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp
+++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp
@@ -772,6 +772,7 @@ ConstantFolding::expr(Instruction *i,
break;
default:
i->op = i->saturate ? OP_SAT : OP_MOV; /* SAT handled by unary() */
+ i->setSrc(2, NULL);
break;
}
i->subOp = 0;
--
2.10.2
More information about the mesa-dev
mailing list