From f0b39779a09de67d3576ae864bffee903523c69e Mon Sep 17 00:00:00 2001 From: Karol Herbst Date: Fri, 23 Feb 2018 22:51:05 +0100 Subject: [PATCH] nvir: dont optimize mad with subops to shladd Signed-off-by: Karol Herbst Reviewed-by: Ilia Mirkin --- 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 0bbf213..48cf749 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.7.4