summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/CostModel.cpp
diff options
context:
space:
mode:
authorJingyue Wu <jingyue@google.com>2015-07-26 19:10:03 +0000
committerJingyue Wu <jingyue@google.com>2015-07-26 19:10:03 +0000
commitbfefff555e0b9b8c6ccf2648229864fcc4ec3276 (patch)
treec215e7c5bca4730a73f5229614b82d8828ca7840 /llvm/lib/Analysis/CostModel.cpp
parent9d8af4de4c1e30fe497c2ddbd52382e3ef33b70f (diff)
downloadbcm5719-llvm-bfefff555e0b9b8c6ccf2648229864fcc4ec3276.tar.gz
bcm5719-llvm-bfefff555e0b9b8c6ccf2648229864fcc4ec3276.zip
Roll forward r243250
r243250 appeared to break clang/test/Analysis/dead-store.c on one of the build slaves, but I couldn't reproduce this failure locally. Probably a false positive as I saw this test was broken by r243246 or r243247 too but passed later without people fixing anything. llvm-svn: 243253
Diffstat (limited to 'llvm/lib/Analysis/CostModel.cpp')
-rw-r--r--llvm/lib/Analysis/CostModel.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/llvm/lib/Analysis/CostModel.cpp b/llvm/lib/Analysis/CostModel.cpp
index b529c1a70aa..da790d74524 100644
--- a/llvm/lib/Analysis/CostModel.cpp
+++ b/llvm/lib/Analysis/CostModel.cpp
@@ -383,10 +383,8 @@ unsigned CostModelAnalysis::getInstructionCost(const Instruction *I) const {
return -1;
switch (I->getOpcode()) {
- case Instruction::GetElementPtr:{
- Type *ValTy = I->getOperand(0)->getType()->getPointerElementType();
- return TTI->getAddressComputationCost(ValTy);
- }
+ case Instruction::GetElementPtr:
+ return TTI->getUserCost(I);
case Instruction::Ret:
case Instruction::PHI:
OpenPOWER on IntegriCloud