summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Pilgrim <llvm-dev@redking.me.uk>2016-11-14 12:00:46 +0000
committerSimon Pilgrim <llvm-dev@redking.me.uk>2016-11-14 12:00:46 +0000
commit475b40dab8c477bdb190f201e1dea8abd9e21499 (patch)
tree35b2b888a4383240f01109a558be52f415b0017e
parentf10d114d4340ff8c8f68e9b424268c7b531e59b3 (diff)
downloadbcm5719-llvm-475b40dab8c477bdb190f201e1dea8abd9e21499.tar.gz
bcm5719-llvm-475b40dab8c477bdb190f201e1dea8abd9e21499.zip
Remove redundant condition (PR28352) NFCI.
We were already testing is the op was not a leaf, so need to then test if it was a leaf (added it to the assert instead). llvm-svn: 286817
-rw-r--r--llvm/lib/Transforms/Scalar/Reassociate.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Scalar/Reassociate.cpp b/llvm/lib/Transforms/Scalar/Reassociate.cpp
index e8abb5b03fb..40c1e3717a2 100644
--- a/llvm/lib/Transforms/Scalar/Reassociate.cpp
+++ b/llvm/lib/Transforms/Scalar/Reassociate.cpp
@@ -508,9 +508,10 @@ static bool LinearizeExprTree(BinaryOperator *I,
continue;
}
// No uses outside the expression, try morphing it.
- } else if (It != Leaves.end()) {
+ } else {
// Already in the leaf map.
- assert(Visited.count(Op) && "In leaf map but not visited!");
+ assert(It != Leaves.end() && Visited.count(Op) &&
+ "In leaf map but not visited!");
// Update the number of paths to the leaf.
IncorporateWeight(It->second, Weight, Opcode);
OpenPOWER on IntegriCloud