summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMatt Arsenault <Matthew.Arsenault@amd.com>2014-01-22 20:30:16 +0000
committerMatt Arsenault <Matthew.Arsenault@amd.com>2014-01-22 20:30:16 +0000
commit4bcb85658db6caa9f347bc79afbd5c4090910a3d (patch)
tree5c19d941f0bad76c3f985511cdbfc1964e409005 /lib
parentff16685a80342552aa767ec22f18d986c832bcb6 (diff)
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
Diffstat (limited to 'lib')
-rw-r--r--lib/Analysis/CostModel.cpp3
1 files changed, 2 insertions, 1 deletions
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);
}