From: Matt Arsenault Date: Wed, 22 Jan 2014 20:30:16 +0000 (+0000) Subject: Get right cost for addrspacecast in cost model X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=4bcb85658db6caa9f347bc79afbd5c4090910a3d;p=oota-llvm.git Get right cost for addrspacecast in cost model git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199833 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Analysis/CostModel.cpp b/lib/Analysis/CostModel.cpp index f9432584691..543977a376f 100644 --- a/lib/Analysis/CostModel.cpp +++ b/lib/Analysis/CostModel.cpp @@ -439,7 +439,8 @@ unsigned CostModelAnalysis::getInstructionCost(const Instruction *I) const { case Instruction::UIToFP: case Instruction::Trunc: case Instruction::FPTrunc: - case Instruction::BitCast: { + case Instruction::BitCast: + case Instruction::AddrSpaceCast: { Type *SrcTy = I->getOperand(0)->getType(); return TTI->getCastInstrCost(I->getOpcode(), I->getType(), SrcTy); }