Support vector casts in more places, fixing a variety of assertion
[oota-llvm.git] / lib / Analysis / ScalarEvolutionExpander.cpp
index abfe94dc80bba34e09339c8698981247cbaf3f6d..2a73c27405a8943eb147f4a39344cf0e7f33ff4b 100644 (file)
@@ -298,9 +298,7 @@ Value *SCEVExpander::expandAddToGEP(const SCEVHandle *op_begin,
               GepIndices.push_back(ConstantInt::get(Type::Int32Ty, ElIdx));
               ElTy = STy->getTypeAtIndex(ElIdx);
               Ops[0] =
-                SE.getConstant(ConstantInt::get(Ty,
-                                                FullOffset -
-                                                  SL.getElementOffset(ElIdx)));
+                SE.getConstant(Ty, FullOffset - SL.getElementOffset(ElIdx));
               AnyNonZeroIndices = true;
               continue;
             }