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.

llvm-svn: 112489
This commit is contained in:
Owen Anderson 2010-08-30 17:03:45 +00:00
parent 561eceb4c4
commit 9517943d11
1 changed files with 3 additions and 2 deletions

View 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");