From: Owen Anderson Date: Mon, 30 Aug 2010 17:03:45 +0000 (+0000) Subject: It is possible to try to merge a not-constant with a constantrage, when dealing with... X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=392953262ee9ce3e3ff714867d01e1e1edbe391d;p=oota-llvm.git It is possible to try to merge a not-constant with a constantrage, when dealing with ptrtoint ConstantExpr's. 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 --- diff --git a/lib/Analysis/LazyValueInfo.cpp b/lib/Analysis/LazyValueInfo.cpp index e7929f3127b..f6f715e4df3 100644 --- a/lib/Analysis/LazyValueInfo.cpp +++ b/lib/Analysis/LazyValueInfo.cpp @@ -196,13 +196,14 @@ public: isa(RHS.getNotConstant())) return markOverdefined(); return false; - } - if (isConstant()) { + } else if (isConstant()) { if (getConstant() == RHS.getNotConstant() || isa(RHS.getNotConstant()) || isa(getConstant())) return markOverdefined(); return markNotConstant(RHS.getNotConstant()); + } else if (isConstantRange()) { + return markOverdefined(); } assert(isUndefined() && "Unexpected lattice");