diff options
author | Nuno Lopes <nunoplopes@sapo.pt> | 2012-05-11 18:25:29 +0000 |
---|---|---|
committer | Nuno Lopes <nunoplopes@sapo.pt> | 2012-05-11 18:25:29 +0000 |
commit | e2cfd3ce954a5a5827249ac64eed0acc8aabfd75 (patch) | |
tree | 796f7ddbfc01ace3fd6a45cb67342a68c420e93a /llvm/lib/Transforms | |
parent | db81e83c2e777786aa588764cb7ac611e4d557f5 (diff) | |
download | bcm5719-llvm-e2cfd3ce954a5a5827249ac64eed0acc8aabfd75.tar.gz bcm5719-llvm-e2cfd3ce954a5a5827249ac64eed0acc8aabfd75.zip |
objectsize: add a few more tests and fix a bug
llvm-svn: 156625
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r-- | llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp b/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp index ea3f95ed230..c9b45d0df11 100644 --- a/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp +++ b/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp @@ -208,7 +208,7 @@ static int computeAllocSize(Value *Alloc, uint64_t &Size, Value* &SizeValue, Size = CI->getZExtValue(); return 1; } - return 0; + return Penalty >= 2 ? 0 : 2; } else if (CallInst *MI = extractCallocCall(Alloc)) { Value *Arg1 = MI->getArgOperand(0); |