On Wed, Nov 9, 2016 at 9:20 AM, Samuel Pitoiset <[email protected]> wrote: > 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.
Sounds like the ADD3 series' addition to this function doesn't handle this scenario. It's already properly handled by FMA/MAD, for example. > > Signed-off-by: Samuel Pitoiset <[email protected]> > --- > 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 > > _______________________________________________ > mesa-dev mailing list > [email protected] > https://lists.freedesktop.org/mailman/listinfo/mesa-dev _______________________________________________ mesa-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-dev
