about summary refs log tree commit diff homepage
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/klee/Expr.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/include/klee/Expr.h b/include/klee/Expr.h
index 3e296934..09b288a8 100644
--- a/include/klee/Expr.h
+++ b/include/klee/Expr.h
@@ -391,10 +391,10 @@ public:
   /* Utility Functions */
 
   /// isZero - Is this a constant zero.
-  bool isZero() const { return getZExtValue() == 0; }
+  bool isZero() const { return getAPValue().isMinValue(); }
 
   /// isOne - Is this a constant one.
-  bool isOne() const { return getZExtValue() == 1; }
+  bool isOne() const { return getLimitedValue() == 1; }
   
   /// isTrue - Is this the true expression.
   bool isTrue() const { 
@@ -407,9 +407,7 @@ public:
   }
 
   /// isAllOnes - Is this constant all ones.
-  bool isAllOnes() const {
-    return getZExtValue(getWidth()) == bits64::maxValueOfNBits(getWidth());
-  }
+  bool isAllOnes() const { return getAPValue().isAllOnesValue(); }
 
   /* Constant Operations */