On Mon, Apr 3, 2017 at 11:58 AM, Karol Herbst <karolher...@gmail.com> wrote: > Signed-off-by: Karol Herbst <karolher...@gmail.com> > --- > src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp > b/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp > index bd60a84998..0de84fe9fc 100644 > --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp > +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp > @@ -1856,6 +1856,12 @@ AlgebraicOpt::handleLOGOP(Instruction *logop) > > set0 = cloneForward(func, set0); > set1 = cloneShallow(func, set1); > + > + if (logop->src(0).mod == Modifier(NV50_IR_MOD_NOT)) > + set0->asCmp()->setCond = inverseCondCode(set0->asCmp()->setCond); > + if (logop->src(1).mod == Modifier(NV50_IR_MOD_NOT)) > + set1->asCmp()->setCond = inverseCondCode(set1->asCmp()->setCond);
set0/set1 may have been swapped further up, so you need to keep track of that. Also, I don't think this will work if one of the sets is a SET_AND -- the condcode applies to the set bit, not to the AND bit. I think you'd also have to flip AND <-> OR and flip the neg. -ilia _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev