Hi, You should check whether N1C isn't NULL here: + N1C = dyn_cast<ConstantSDNode>(N1.getOperand(0)); + // fold (mul x, 1) -> x + if (N1C->getAPIntValue() == 1) Best, Kuba On Jun 16, 2013, at 2:22 PM, "Demikhovsky, Elena" <elena.demikhovsky at intel.com> wrote: > <mul.diff>