diff --git a/llvm/lib/CodeGen/InterleavedLoadCombinePass.cpp b/llvm/lib/CodeGen/InterleavedLoadCombinePass.cpp --- a/llvm/lib/CodeGen/InterleavedLoadCombinePass.cpp +++ b/llvm/lib/CodeGen/InterleavedLoadCombinePass.cpp @@ -1158,8 +1158,7 @@ // be expected. Also sum the cost of the Instructions beeing left dead. for (auto &I : Is) { // Compute the old cost - InstructionCost += - TTI.getInstructionCost(I, TargetTransformInfo::TCK_Latency); + InstructionCost += TTI.getInstructionCost(I, TTI::TCK_SizeAndLatency); // The final SVIs are allowed not to be dead, all uses will be replaced if (SVIs.find(I) != SVIs.end()) @@ -1212,7 +1211,7 @@ Indices.push_back(i); InterleavedCost = TTI.getInterleavedMemoryOpCost( Instruction::Load, ILTy, Factor, Indices, InsertionPoint->getAlign(), - InsertionPoint->getPointerAddressSpace()); + InsertionPoint->getPointerAddressSpace(), TTI::TCK_SizeAndLatency); if (InterleavedCost >= InstructionCost) { return false;