summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarol Herbst <[email protected]>2016-01-28 16:45:58 +0100
committerIlia Mirkin <[email protected]>2016-02-16 18:20:10 -0500
commitedf774bb7eae32f00b900a6faa9b5c698affdcaa (patch)
tree2cc0c21290b2772c09a964cbd23548ab565d9a6c
parent068e9848ba5937673d66c42a4b44067fd78becaf (diff)
nv50/ir: we can't do the add to mad conversion when the mul saturates
Reviewed-by: Ilia Mirkin <[email protected]>
-rw-r--r--src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp3
1 files changed, 3 insertions, 0 deletions
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) {