summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2015-03-09 01:57:13 +0000
committerDavid Blaikie <dblaikie@gmail.com>2015-03-09 01:57:13 +0000
commitdc3f01e9cfc098bb2a55b103396eb3f0464b0c7a (patch)
tree41e53ef86195787acb15962965c7475b8804771f /llvm/lib/Transforms
parent2a08dca3f719f207ead372bc0b635c757efd41c6 (diff)
downloadbcm5719-llvm-dc3f01e9cfc098bb2a55b103396eb3f0464b0c7a.tar.gz
bcm5719-llvm-dc3f01e9cfc098bb2a55b103396eb3f0464b0c7a.zip
Simplify expressions involving boolean constants with clang-tidy
Patch by Richard (legalize at xmission dot com). Differential Revision: http://reviews.llvm.org/D8154 llvm-svn: 231617
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r--llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp b/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
index eff575ebcaa..02f1e75f1b8 100644
--- a/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
+++ b/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
@@ -927,7 +927,7 @@ Instruction *InstCombiner::visitSelectInst(SelectInst &SI) {
return BinaryOperator::CreateAnd(NotCond, FalseVal);
}
if (ConstantInt *C = dyn_cast<ConstantInt>(FalseVal)) {
- if (C->getZExtValue() == false) {
+ if (!C->getZExtValue()) {
// Change: A = select B, C, false --> A = and B, C
return BinaryOperator::CreateAnd(CondVal, TrueVal);
}
OpenPOWER on IntegriCloud