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:
parent
3c49580e44
commit
17235b194b
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user