From: Zhou Sheng Date: Thu, 11 Jan 2007 14:38:17 +0000 (+0000) Subject: Remove unnecessary boolean type check. X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=34dceb47573b0aedd188b5e72bb848ba29a4960f;p=oota-llvm.git Remove unnecessary boolean type check. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33075 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Transforms/Scalar/InstructionCombining.cpp b/lib/Transforms/Scalar/InstructionCombining.cpp index e82f373801a..b06cffd24a9 100644 --- a/lib/Transforms/Scalar/InstructionCombining.cpp +++ b/lib/Transforms/Scalar/InstructionCombining.cpp @@ -6553,8 +6553,7 @@ Instruction *InstCombiner::visitSelectInst(SelectInst &SI) { // select true, X, Y -> X // select false, X, Y -> Y if (ConstantInt *C = dyn_cast(CondVal)) - if (C->getType() == Type::BoolTy) - return ReplaceInstUsesWith(SI, C->getBoolValue() ? TrueVal : FalseVal); + return ReplaceInstUsesWith(SI, C->getBoolValue() ? TrueVal : FalseVal); // select C, X, X -> X if (TrueVal == FalseVal)