[LVI] Remove dead code in mergeIn
authorPhilip Reames <listmail@philipreames.com>
Tue, 6 Dec 2016 03:34:33 +0000 (03:34 +0000)
committerPhilip Reames <listmail@philipreames.com>
Tue, 6 Dec 2016 03:34:33 +0000 (03:34 +0000)
Integers are expressed in the lattice via constant ranges.  They can never be represented by constants or not-constants; those are reserved for non-integer types.  This code has been dead for literaly years.

llvm-svn: 288767

llvm/lib/Analysis/LazyValueInfo.cpp

index 6bce7c6..82478b7 100644 (file)
@@ -228,15 +228,6 @@ public:
       if (RHS.isNotConstant()) {
         if (Val == RHS.Val)
           return markOverdefined();
-
-        // Unless we can prove that the two Constants are different, we must
-        // move to overdefined.
-        if (ConstantInt *Res =
-                dyn_cast<ConstantInt>(ConstantFoldCompareInstOperands(
-                    CmpInst::ICMP_NE, getConstant(), RHS.getNotConstant(), DL)))
-          if (Res->isOne())
-            return markNotConstant(RHS.getNotConstant());
-
         return markOverdefined();
       }
 
@@ -247,15 +238,6 @@ public:
       if (RHS.isConstant()) {
         if (Val == RHS.Val)
           return markOverdefined();
-
-        // Unless we can prove that the two Constants are different, we must
-        // move to overdefined.
-        if (ConstantInt *Res =
-                dyn_cast<ConstantInt>(ConstantFoldCompareInstOperands(
-                    CmpInst::ICMP_NE, getNotConstant(), RHS.getConstant(), DL)))
-          if (Res->isOne())
-            return false;
-
         return markOverdefined();
       }