Module: Mesa
Branch: master
Commit: f0b39779a09de67d3576ae864bffee903523c69e
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=f0b39779a09de67d3576ae864bffee903523c69e

Author: Karol Herbst <kher...@redhat.com>
Date:   Fri Feb 23 22:51:05 2018 +0100

nvir: dont optimize mad with subops to shladd

Signed-off-by: Karol Herbst <kher...@redhat.com>
Reviewed-by: Ilia Mirkin <imir...@alum.mit.edu>

---

 src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp 
b/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp
index 0bbf21312f..48cf74950d 100644
--- a/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp
+++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp
@@ -1055,7 +1055,8 @@ ConstantFolding::opnd(Instruction *i, ImmediateValue 
&imm0, int s)
       } else
       if (s == 1 && !imm0.isNegative() && imm0.isPow2() &&
           !isFloatType(i->dType) &&
-          target->isOpSupported(OP_SHLADD, i->dType)) {
+          target->isOpSupported(OP_SHLADD, i->dType) &&
+          !i->subOp) {
          i->op = OP_SHLADD;
          imm0.applyLog2();
          i->setSrc(1, new_ImmediateValue(prog, imm0.reg.data.u32));

_______________________________________________
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to