summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/IPO/SimplifyLibCalls.cpp
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2006-12-21 07:15:54 +0000
committerReid Spencer <rspencer@reidspencer.com>2006-12-21 07:15:54 +0000
commit4720d4d9ef16462822e1f7af62cdd483c1a607c9 (patch)
tree1f3d1744ec9e628d45168a9edbe1351c14c1a453 /llvm/lib/Transforms/IPO/SimplifyLibCalls.cpp
parenta8a90a2f977461cc0b5381191a7d128a5d3b57dc (diff)
downloadbcm5719-llvm-4720d4d9ef16462822e1f7af62cdd483c1a607c9.tar.gz
bcm5719-llvm-4720d4d9ef16462822e1f7af62cdd483c1a607c9.zip
Get rid of a useless if statement whose then and else blocks were identical.
llvm-svn: 32729
Diffstat (limited to 'llvm/lib/Transforms/IPO/SimplifyLibCalls.cpp')
-rw-r--r--llvm/lib/Transforms/IPO/SimplifyLibCalls.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/llvm/lib/Transforms/IPO/SimplifyLibCalls.cpp b/llvm/lib/Transforms/IPO/SimplifyLibCalls.cpp
index bbe020ce1e9..7cc1a5bccb5 100644
--- a/llvm/lib/Transforms/IPO/SimplifyLibCalls.cpp
+++ b/llvm/lib/Transforms/IPO/SimplifyLibCalls.cpp
@@ -920,10 +920,7 @@ struct StrLenOptimization : public LibCallOptimization {
// strlen("xyz") -> 3 (for example)
const Type *Ty = SLC.getTargetData()->getIntPtrType();
- if (Ty->isSigned())
- ci->replaceAllUsesWith(ConstantInt::get(Ty, len));
- else
- ci->replaceAllUsesWith(ConstantInt::get(Ty, len));
+ ci->replaceAllUsesWith(ConstantInt::get(Ty, len));
ci->eraseFromParent();
return true;
OpenPOWER on IntegriCloud