diff options
Diffstat (limited to 'llvm/lib/Transforms/Scalar/NaryReassociate.cpp')
-rw-r--r-- | llvm/lib/Transforms/Scalar/NaryReassociate.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/Scalar/NaryReassociate.cpp b/llvm/lib/Transforms/Scalar/NaryReassociate.cpp index e2081f7bb8f..81744c08cd3 100644 --- a/llvm/lib/Transforms/Scalar/NaryReassociate.cpp +++ b/llvm/lib/Transforms/Scalar/NaryReassociate.cpp @@ -354,9 +354,8 @@ NaryReassociatePass::tryReassociateGEPAtIndex(GetElementPtrInst *GEP, IndexExprs[I] = SE->getZeroExtendExpr(IndexExprs[I], GEP->getOperand(I)->getType()); } - const SCEV *CandidateExpr = SE->getGEPExpr( - GEP->getSourceElementType(), SE->getSCEV(GEP->getPointerOperand()), - IndexExprs, GEP->isInBounds()); + const SCEV *CandidateExpr = SE->getGEPExpr(cast<GEPOperator>(GEP), + IndexExprs); Value *Candidate = findClosestMatchingDominator(CandidateExpr, GEP); if (Candidate == nullptr) |