Use getConstant for ConstantInts.
authorNick Lewycky <nicholas@mxc.ca>
Wed, 20 Feb 2008 06:58:55 +0000 (06:58 +0000)
committerNick Lewycky <nicholas@mxc.ca>
Wed, 20 Feb 2008 06:58:55 +0000 (06:58 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47361 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/ScalarEvolution.cpp

index 0aeecb76bcc0c24a99e74f22062063fb47d1f7a1..7f1cac0f43d34f44ce409300975dc3ef9750536c 100644 (file)
@@ -522,7 +522,7 @@ SCEVHandle ScalarEvolution::getNegativeSCEV(const SCEVHandle &V) {
   if (SCEVConstant *VC = dyn_cast<SCEVConstant>(V))
     return getUnknown(ConstantExpr::getNeg(VC->getValue()));
 
-  return getMulExpr(V, getUnknown(ConstantInt::getAllOnesValue(V->getType())));
+  return getMulExpr(V, getConstant(ConstantInt::getAllOnesValue(V->getType())));
 }
 
 /// getNotSCEV - Return a SCEV corresponding to ~V = -1-V
@@ -530,7 +530,7 @@ SCEVHandle ScalarEvolution::getNotSCEV(const SCEVHandle &V) {
   if (SCEVConstant *VC = dyn_cast<SCEVConstant>(V))
     return getUnknown(ConstantExpr::getNot(VC->getValue()));
 
-  SCEVHandle AllOnes = getUnknown(ConstantInt::getAllOnesValue(V->getType()));
+  SCEVHandle AllOnes = getConstant(ConstantInt::getAllOnesValue(V->getType()));
   return getMinusSCEV(AllOnes, V);
 }