From: Reid Spencer Date: Thu, 21 Dec 2006 07:15:54 +0000 (+0000) Subject: Get rid of a useless if statement whose then and else blocks were identical. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=a2913eea9d7530f8cad652b984cb642ee12c0d6d;p=oota-llvm.git 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 --- diff --git a/lib/Transforms/IPO/SimplifyLibCalls.cpp b/lib/Transforms/IPO/SimplifyLibCalls.cpp index bbe020ce1e9..7cc1a5bccb5 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;