Add a comment to describe why vector shuffles are legalized to custom DAG nodes.
[oota-llvm.git] / lib / Analysis / LoopVR.cpp
index ccd5400df8d00ff378475f04404cb8d4f7cf679d..921d6ce06e91bcd6ffab3de76cecb9d3ff0db97c 100644 (file)
@@ -43,8 +43,6 @@ ConstantRange LoopVR::getRange(const SCEV *S, const SCEV *T, ScalarEvolution &SE
   if (const SCEVConstant *C = dyn_cast<SCEVConstant>(S))
     return ConstantRange(C->getValue()->getValue());
     
-  LLVMContext &Context = SE.getContext();
-
   ConstantRange FullSet(cast<IntegerType>(S->getType())->getBitWidth(), true);
 
   // {x,+,y,+,...z}. We detect overflow by checking the size of the set after
@@ -75,8 +73,8 @@ ConstantRange LoopVR::getRange(const SCEV *S, const SCEV *T, ScalarEvolution &SE
     ConstantRange X = getRange(Mul->getOperand(0), T, SE);
     if (X.isFullSet()) return FullSet;
 
-    const IntegerType *Ty = Context.getIntegerType(X.getBitWidth());
-    const IntegerType *ExTy = Context.getIntegerType(X.getBitWidth() *
+    const IntegerType *Ty = IntegerType::get(X.getBitWidth());
+    const IntegerType *ExTy = IntegerType::get(X.getBitWidth() *
                                                Mul->getNumOperands());
     ConstantRange XExt = X.zeroExtend(ExTy->getBitWidth());