Convert ConstantExpr::getGetElementPtr and
[oota-llvm.git] / lib / Analysis / ScalarEvolutionExpander.cpp
index 1904bdc5867ebe1ccd2585f05f369f1abb777632..7ebf82a2aef40410b30b32fbe7f38eed50837763 100644 (file)
@@ -494,7 +494,7 @@ Value *SCEVExpander::expandAddToGEP(const SCEV *const *op_begin,
     // Fold a GEP with constant operands.
     if (Constant *CLHS = dyn_cast<Constant>(V))
       if (Constant *CRHS = dyn_cast<Constant>(Idx))
-        return ConstantExpr::getGetElementPtr(CLHS, &CRHS, 1);
+        return ConstantExpr::getGetElementPtr(CLHS, CRHS);
 
     // Do a quick scan to see if we have this GEP nearby.  If so, reuse it.
     unsigned ScanLimit = 6;