Start using the new function cloning header
[oota-llvm.git] / lib / Analysis / Expressions.cpp
index 7901b1421e5c34a4f284dde5de39b14b8607851f..14ba9c8e9dcfcf6a3242944cc266beb7e8f65346 100644 (file)
@@ -30,7 +30,7 @@ ExprType::ExprType(const ConstantInt *scale, Value *var,
                   const ConstantInt *offset) {
   Scale = var ? scale : 0; Var = var; Offset = offset;
   ExprTy = Scale ? ScaledLinear : (Var ? Linear : Constant);
-  if (Scale && Scale->equalsInt(0)) {  // Simplify 0*Var + const
+  if (Scale && Scale->isNullValue()) {  // Simplify 0*Var + const
     Scale = 0; Var = 0;
     ExprTy = Constant;
   }
@@ -245,9 +245,9 @@ ExprType ClassifyExpression(Value *Expr) {
     return Expr;
   case Value::ConstantVal:              // Constant value, just return constant
     Constant *CPV = cast<Constant>(Expr);
-    if (CPV->getType()->isIntegral()) { // It's an integral constant!
+    if (CPV->getType()->isInteger()) { // It's an integral constant!
       ConstantInt *CPI = cast<ConstantInt>(Expr);
-      return ExprType(CPI->equalsInt(0) ? 0 : CPI);
+      return ExprType(CPI->isNullValue() ? 0 : CPI);
     }
     return Expr;
   }