Bug fix
authorHamed Gorjiara <hgorjiar@uci.edu>
Sun, 5 Aug 2018 01:58:23 +0000 (18:58 -0700)
committerHamed Gorjiara <hgorjiar@uci.edu>
Sun, 5 Aug 2018 01:58:23 +0000 (18:58 -0700)
src/ASTTransform/elementopt.cc

index d6dec3d..3f1f892 100755 (executable)
@@ -98,7 +98,7 @@ void ElementOpt::handlePredicateInequality(BooleanPredicate *pred, ElementSet *v
        case SATC_LT: {
                for(uint i=0; i<size; i++) {
                        uint64_t val = s->getElement(i);
-                       if (val >= cvalue)
+                       if (val < cvalue)
                                elemArray[count++] = val;
                }
                break;
@@ -106,7 +106,7 @@ void ElementOpt::handlePredicateInequality(BooleanPredicate *pred, ElementSet *v
        case SATC_GT: {
                for(uint i=0; i<size; i++) {
                        uint64_t val = s->getElement(i);
-                       if (val <= cvalue)
+                       if (val > cvalue)
                                elemArray[count++] = val;
                }
                break;
@@ -114,7 +114,7 @@ void ElementOpt::handlePredicateInequality(BooleanPredicate *pred, ElementSet *v
        case SATC_LTE: {
                for(uint i=0; i<size; i++) {
                        uint64_t val = s->getElement(i);
-                       if (val > cvalue)
+                       if (val <= cvalue)
                                elemArray[count++] = val;
                }
                break;
@@ -122,7 +122,7 @@ void ElementOpt::handlePredicateInequality(BooleanPredicate *pred, ElementSet *v
        case SATC_GTE: {
                for(uint i=0; i<size; i++) {
                        uint64_t val = s->getElement(i);
-                       if (val < cvalue)
+                       if (val >= cvalue)
                                elemArray[count++] = val;
                }
                break;