Get rid of a useless if statement whose then and else blocks were identical.
authorReid Spencer <rspencer@reidspencer.com>
Thu, 21 Dec 2006 07:15:54 +0000 (07:15 +0000)
committerReid Spencer <rspencer@reidspencer.com>
Thu, 21 Dec 2006 07:15:54 +0000 (07:15 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32729 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/IPO/SimplifyLibCalls.cpp

index bbe020ce1e9bc0f6f3b55675bf5e4a1911332316..7cc1a5bccb55fa5ffab11a74c015910d27e16aeb 100644 (file)
@@ -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;