[Mesa-dev] [PATCH] nvir: dont optimize mad with subops to shladd

Karol Herbst kherbst at redhat.com
Sat Feb 24 10:43:05 UTC 2018


Signed-off-by: Karol Herbst <kherbst at redhat.com>
---
 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));
-- 
2.14.3



More information about the mesa-dev mailing list