Index: lib/Analysis/InlineCost.cpp =================================================================== --- lib/Analysis/InlineCost.cpp +++ lib/Analysis/InlineCost.cpp @@ -350,9 +350,7 @@ Indices.push_back(SimpleOp); else Indices.push_back(*I); - return TargetTransformInfo::TCC_Free == - TTI.getGEPCost(GEP.getSourceElementType(), GEP.getPointerOperand(), - Indices); + return TargetTransformInfo::TCC_Free == TTI.getUserCost(&GEP); } bool CallAnalyzer::visitAlloca(AllocaInst &I) {