From: Karol Herbst Date: Thu, 28 Jan 2016 15:45:58 +0000 (+0100) Subject: nv50/ir: we can't do the add to mad conversion when the mul saturates X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=edf774bb7eae32f00b900a6faa9b5c698affdcaa;p=mesa.git nv50/ir: we can't do the add to mad conversion when the mul saturates Reviewed-by: Ilia Mirkin --- diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp index 35b1fa7795e..6192c0665e4 100644 --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp @@ -1635,6 +1635,9 @@ AlgebraicOpt::tryADDToMADOrSAD(Instruction *add, operation toOp) if (src->getUniqueInsn() && src->getUniqueInsn()->bb != add->bb) return false; + if (src->getInsn()->saturate) + return false; + if (src->getInsn()->postFactor) return false; if (toOp == OP_SAD) {