}
if (t[i].getConst<Rational>().getNumerator() == Integer(2).pow(bsize) - 1)
{
- // ((_ iand k) 111...1 y) ---> y
- return RewriteResponse(REWRITE_DONE, t[i == 0 ? 1 : 0]);
+ // ((_ iand k) 111...1 y) ---> (mod y 2^k)
+ Node twok = nm->mkConstInt(Rational(Integer(2).pow(bsize)));
+ Node ret = nm->mkNode(kind::INTS_MODULUS, t[1-i], twok);
+ return RewriteResponse(REWRITE_AGAIN, ret);
}
}
return RewriteResponse(REWRITE_DONE, t);
regress1/nl/issue5662-nl-tc.smt2
regress1/nl/issue5662-nl-tc-min.smt2
regress1/nl/issue7924-sqrt-partial.smt2
+ regress1/nl/issue8016-iand-rewrite.smt2
regress1/nl/metitarski-1025.smt2
regress1/nl/metitarski-3-4.smt2
regress1/nl/metitarski_3_4_2e.smt2