1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 04:02:41 +01:00

Remove unnecessary boolean type check.

llvm-svn: 33075
This commit is contained in:
Zhou Sheng 2007-01-11 14:38:17 +00:00
parent 3c49580e44
commit 17235b194b

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)