For PR1205:
Adjust to changes in ConstantRange interface.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34762 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Analysis/ScalarEvolution.cpp b/lib/Analysis/ScalarEvolution.cpp
index 364e122..7ce975e 100644
--- a/lib/Analysis/ScalarEvolution.cpp
+++ b/lib/Analysis/ScalarEvolution.cpp
@@ -124,7 +124,7 @@
   const Type *Ty = getType();
   assert(Ty->isInteger() && "Can't get range for a non-integer SCEV!");
   // Default to a full range if no better information is available.
-  return ConstantRange(getType());
+  return ConstantRange(getBitWidth());
 }
 
 uint32_t SCEV::getBitWidth() const {
@@ -211,7 +211,7 @@
 }
 
 ConstantRange SCEVTruncateExpr::getValueRange() const {
-  return getOperand()->getValueRange().truncate(getType());
+  return getOperand()->getValueRange().truncate(getBitWidth());
 }
 
 void SCEVTruncateExpr::print(std::ostream &OS) const {
@@ -237,7 +237,7 @@
 }
 
 ConstantRange SCEVZeroExtendExpr::getValueRange() const {
-  return getOperand()->getValueRange().zeroExtend(getType());
+  return getOperand()->getValueRange().zeroExtend(getBitWidth());
 }
 
 void SCEVZeroExtendExpr::print(std::ostream &OS) const {
@@ -1572,7 +1572,8 @@
           ConstantExpr::getBitCast(CompVal, RealTy));
         if (CompVal) {
           // Form the constant range.
-          ConstantRange CompRange(Cond, CompVal->getValue());
+          ConstantRange CompRange(
+              ICmpInst::makeConstantRange(Cond, CompVal->getValue()));
 
           SCEVHandle Ret = AddRec->getNumIterationsInRange(CompRange, 
               false /*Always treat as unsigned range*/);