It is possible to try to merge a not-constant with a constantrage, when dealing with...
authorOwen Anderson <resistor@mac.com>
Mon, 30 Aug 2010 17:03:45 +0000 (17:03 +0000)
committerOwen Anderson <resistor@mac.com>
Mon, 30 Aug 2010 17:03:45 +0000 (17:03 +0000)
Unfortunately, the only testcase I have for this is huge and doesn't reduce well because the error is
sensitive to iteration-order issues, since the problem only occurs when merging values in a particular order.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112489 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/LazyValueInfo.cpp

index e7929f3127bf928a511b1313e2f24d217105540a..f6f715e4df3e0ce74299ae0c5e0bd26b1e960728 100644 (file)
@@ -196,13 +196,14 @@ public:
             isa<ConstantExpr>(RHS.getNotConstant()))
           return markOverdefined();
         return false;
-      }
-      if (isConstant()) {
+      } else if (isConstant()) {
         if (getConstant() == RHS.getNotConstant() ||
             isa<ConstantExpr>(RHS.getNotConstant()) ||
             isa<ConstantExpr>(getConstant()))
           return markOverdefined();
         return markNotConstant(RHS.getNotConstant());
+      } else if (isConstantRange()) {
+        return markOverdefined();
       }
       
       assert(isUndefined() && "Unexpected lattice");