aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorZhou Sheng <zhousheng00@gmail.com>2007-01-11 14:38:17 +0000
committerZhou Sheng <zhousheng00@gmail.com>2007-01-11 14:38:17 +0000
commit34dceb47573b0aedd188b5e72bb848ba29a4960f (patch)
tree37277d9393d3dc4f7db2014900458f7ddd42e9ef /lib
parent9c799ffbbe47253e675c8bc67782275c17f5a3ab (diff)
downloadexternal_llvm-34dceb47573b0aedd188b5e72bb848ba29a4960f.zip
external_llvm-34dceb47573b0aedd188b5e72bb848ba29a4960f.tar.gz
external_llvm-34dceb47573b0aedd188b5e72bb848ba29a4960f.tar.bz2
Remove unnecessary boolean type check.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33075 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Transforms/Scalar/InstructionCombining.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/Transforms/Scalar/InstructionCombining.cpp b/lib/Transforms/Scalar/InstructionCombining.cpp
index e82f373..b06cffd 100644
--- a/lib/Transforms/Scalar/InstructionCombining.cpp
+++ b/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)