about summary refs log tree commit diff homepage
path: root/lib/Expr/ExprEvaluator.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Expr/ExprEvaluator.cpp')
-rw-r--r--lib/Expr/ExprEvaluator.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Expr/ExprEvaluator.cpp b/lib/Expr/ExprEvaluator.cpp
index efb0d658..1a146641 100644
--- a/lib/Expr/ExprEvaluator.cpp
+++ b/lib/Expr/ExprEvaluator.cpp
@@ -17,7 +17,7 @@ ExprVisitor::Action ExprEvaluator::evalRead(const UpdateList &ul,
     ref<Expr> ui = visit(un->index);
     
     if (ConstantExpr *CE = dyn_cast<ConstantExpr>(ui)) {
-      if (CE->getConstantValue() == index)
+      if (CE->getZExtValue() == index)
         return Action::changeTo(visit(un->value));
     } else {
       // update index is unknown, so may or may not be index, we
@@ -61,7 +61,7 @@ ExprVisitor::Action ExprEvaluator::visitRead(const ReadExpr &re) {
   ref<Expr> v = visit(re.index);
   
   if (ConstantExpr *CE = dyn_cast<ConstantExpr>(v)) {
-    return evalRead(re.updates, CE->getConstantValue());
+    return evalRead(re.updates, CE->getZExtValue());
   } else {
     return Action::doChildren();
   }