projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9c799ff
)
Remove unnecessary boolean type check.
author
Zhou Sheng
<zhousheng00@gmail.com>
Thu, 11 Jan 2007 14:38:17 +0000
(14:38 +0000)
committer
Zhou Sheng
<zhousheng00@gmail.com>
Thu, 11 Jan 2007 14:38:17 +0000
(14:38 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33075
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Transforms/Scalar/InstructionCombining.cpp
patch
|
blob
|
history
diff --git
a/lib/Transforms/Scalar/InstructionCombining.cpp
b/lib/Transforms/Scalar/InstructionCombining.cpp
index e82f373801a24d2a8f9db286fbbfd79d923b7d2d..b06cffd24a9ec5b800c9a9a097a17d16ed303f00 100644
(file)
--- 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)