From bd23db9968ac7583431836ffcf9957f8e38c1aea Mon Sep 17 00:00:00 2001 From: Zhou Sheng Date: Thu, 11 Jan 2007 14:38:17 +0000 Subject: Remove unnecessary boolean type check. llvm-svn: 33075 --- llvm/lib/Transforms/Scalar/InstructionCombining.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'llvm/lib/Transforms') diff --git a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp index e82f373801a..b06cffd24a9 100644 --- a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp +++ b/llvm/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) -- cgit v1.2.3