diff options
author | Zhou Sheng <zhousheng00@gmail.com> | 2007-01-11 14:38:17 +0000 |
---|---|---|
committer | Zhou Sheng <zhousheng00@gmail.com> | 2007-01-11 14:38:17 +0000 |
commit | bd23db9968ac7583431836ffcf9957f8e38c1aea (patch) | |
tree | e35339bd4b23100360afd7b4d23fba80e3836fbb /llvm/lib | |
parent | eb29b0bb6e1822178d380e853f3a83613e5b19e6 (diff) | |
download | bcm5719-llvm-bd23db9968ac7583431836ffcf9957f8e38c1aea.tar.gz bcm5719-llvm-bd23db9968ac7583431836ffcf9957f8e38c1aea.zip |
Remove unnecessary boolean type check.
llvm-svn: 33075
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/Transforms/Scalar/InstructionCombining.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
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<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) |