result = NodeFactory::CreateTerm(BEEV::BVEXTRACT, width, a, i, j);
}
}
+ else if (BEEV::BVUMINUS == children[0].GetKind() && children[1] ==bm.CreateZeroConst(children[1].GetValueWidth()) && children[2] == bm.CreateZeroConst(children[2].GetValueWidth()))
+ {
+ result = NodeFactory::CreateTerm(BEEV::BVEXTRACT, width, children[0][0],children[1],children[2]);
+ }
break;
case BEEV::BVPLUS:
result = children[0];
else if (children[0] == children[1])
result = bm.CreateZeroConst(width);
+ else if (children[1].isConstant() && children[1] == bm.CreateOneConst(width))
+ result = bm.CreateZeroConst(width);
+ else if (children[0].GetKind() == BEEV::BVUMINUS && children[0][0] == children[1])
+ result = bm.CreateZeroConst(width);
+ else if (children[1].GetKind() == BEEV::BVUMINUS && children[1][0] == children[0])
+ result = bm.CreateZeroConst(width);
else
result = BEEV::ArrayTransformer::TranslateSignedDivModRem(hashing.CreateTerm(kind, width, children),this,&bm);
break;
case BEEV::SBVDIV:
if (children[1].isConstant() && children[1] == bm.CreateOneConst(width))
result = children[0];
+ else if (children[0] == children[1] && bm.UserFlags.division_by_zero_returns_one_flag)
+ result = bm.CreateOneConst(width);
else
result = BEEV::ArrayTransformer::TranslateSignedDivModRem(hashing.CreateTerm(kind, width, children),this,&bm);
break;