Remove unnecessary boolean type check.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33075 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Zhou Sheng 2007-01-11 14:38:17 +00:00
parent 9c799ffbbe
commit 34dceb4757

View File

@ -6553,8 +6553,7 @@ Instruction *InstCombiner::visitSelectInst(SelectInst &SI) {
// select true, X, Y -> X
// select false, X, Y -> Y
if (ConstantInt *C = dyn_cast<ConstantInt>(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)