summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar/StraightLineStrengthReduce.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Transforms/Scalar/StraightLineStrengthReduce.cpp')
-rw-r--r--llvm/lib/Transforms/Scalar/StraightLineStrengthReduce.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/Scalar/StraightLineStrengthReduce.cpp b/llvm/lib/Transforms/Scalar/StraightLineStrengthReduce.cpp
index b440db377e2..c4d18f1c156 100644
--- a/llvm/lib/Transforms/Scalar/StraightLineStrengthReduce.cpp
+++ b/llvm/lib/Transforms/Scalar/StraightLineStrengthReduce.cpp
@@ -499,9 +499,7 @@ void StraightLineStrengthReduce::allocateCandidatesAndFindBasisForGEP(
// The base of this candidate is GEP's base plus the offsets of all
// indices except this current one.
- const SCEV *BaseExpr = SE->getGEPExpr(GEP->getSourceElementType(),
- SE->getSCEV(GEP->getPointerOperand()),
- IndexExprs, GEP->isInBounds());
+ const SCEV *BaseExpr = SE->getGEPExpr(cast<GEPOperator>(GEP), IndexExprs);
Value *ArrayIdx = GEP->getOperand(I);
uint64_t ElementSize = DL->getTypeAllocSize(*GTI);
if (ArrayIdx->getType()->getIntegerBitWidth() <=
OpenPOWER on IntegriCloud