aboutsummaryrefslogtreecommitdiff
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
commita2913eea9d7530f8cad652b984cb642ee12c0d6d (patch)
treeb14ff6f17d2ac1ca62822ee4a3e6d9533395d6bb
parent2e20d39493aa58dfe7b1f9e8890215f0dedc038f (diff)
Get rid of a useless if statement whose then and else blocks were identical.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32729 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Transforms/IPO/SimplifyLibCalls.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/Transforms/IPO/SimplifyLibCalls.cpp b/lib/Transforms/IPO/SimplifyLibCalls.cpp
index bbe020ce1e..7cc1a5bccb 100644
--- a/lib/Transforms/IPO/SimplifyLibCalls.cpp
+++ b/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;