From: Karol Herbst Date: Fri, 23 Feb 2018 21:51:05 +0000 (+0100) Subject: nvir: dont optimize mad with subops to shladd X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f0b39779a09de67d3576ae864bffee903523c69e;p=mesa.git nvir: dont optimize mad with subops to shladd Signed-off-by: Karol Herbst 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 0bbf21312fe..48cf74950df 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));