@@ -2647,11 +2647,8 @@ InlineAsm::InlineAsm(Type &type, string &&name, const string &asm_str,
26472647 std::move(attrs)) {}
26482648
26492649
2650- ICmp::ICmp (Type &type, string &&name, Cond cond, Value &a, Value &b,
2651- unsigned flags)
2652- : Instr(type, std::move(name)), a(&a), b(&b), cond(cond), flags(flags),
2653- defined(cond != Any) {
2654- assert ((flags & SameSign) == flags);
2650+ ICmp::ICmp (Type &type, string &&name, Cond cond, Value &a, Value &b)
2651+ : Instr(type, std::move(name)), a(&a), b(&b), cond(cond), defined(cond != Any) {
26552652 if (!defined )
26562653 cond_name = getName () + " _cond" ;
26572654}
@@ -2699,10 +2696,7 @@ void ICmp::print(ostream &os) const {
26992696 case UGT: condtxt = " ugt " ; break ;
27002697 case Any: condtxt = " " ; break ;
27012698 }
2702- os << getName () << " = icmp " ;
2703- if (flags & SameSign)
2704- os << " samesign " ;
2705- os << condtxt << *a << " , " << b->getName ();
2699+ os << getName () << " = icmp " << condtxt << *a << " , " << b->getName ();
27062700 switch (pcmode) {
27072701 case INTEGRAL: break ;
27082702 case PROVENANCE: os << " , use_provenance" ; break ;
@@ -2729,7 +2723,7 @@ StateValue ICmp::toSMT(State &s) const {
27292723 auto &b_eval = s[*b];
27302724
27312725 function<expr (const expr&, const expr&, Cond)> fn =
2732- [](auto &av, auto &bv, Cond cond) {
2726+ [& ](auto &av, auto &bv, Cond cond) {
27332727 switch (cond) {
27342728 case EQ: return av == bv;
27352729 case NE: return av != bv;
@@ -2771,8 +2765,7 @@ StateValue ICmp::toSMT(State &s) const {
27712765 auto scalar = [&](const StateValue &a, const StateValue &b) -> StateValue {
27722766 auto fn2 = [&](Cond c) { return fn (a.value , b.value , c); };
27732767 auto v = cond != Any ? fn2 (cond) : build_icmp_chain (cond_var (), fn2);
2774- auto np = flags & SameSign ? a.value .sign () == b.value .sign () : true ;
2775- return { v.toBVBool (), a.non_poison && b.non_poison && np };
2768+ return { v.toBVBool (), a.non_poison && b.non_poison };
27762769 };
27772770
27782771 auto &elem_ty = a->getType ();
@@ -2796,7 +2789,7 @@ expr ICmp::getTypeConstraints(const Function &f) const {
27962789}
27972790
27982791unique_ptr<Instr> ICmp::dup (Function &f, const string &suffix) const {
2799- return make_unique<ICmp>(getType (), getName () + suffix, cond, *a, *b, flags );
2792+ return make_unique<ICmp>(getType (), getName () + suffix, cond, *a, *b);
28002793}
28012794
28022795
0 commit comments