1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 03:33:20 +01:00

Get right cost for addrspacecast in cost model

llvm-svn: 199833
This commit is contained in:
Matt Arsenault 2014-01-22 20:30:16 +00:00
parent 012bf3f3ac
commit a92412ccb2

View File

@ -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);
}