summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2015-03-02 11:57:04 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2015-03-02 11:57:04 +0000
commit8008e9f624074ac0e59642653a2a9b460fe44639 (patch)
tree15ecf75cc8ccb57562e408ca5cb214ffa2edeba3 /llvm/lib/CodeGen/SelectionDAG
parent37f80456ce0d1abc10683d266695c587045439c4 (diff)
downloadbcm5719-llvm-8008e9f624074ac0e59642653a2a9b460fe44639.tar.gz
bcm5719-llvm-8008e9f624074ac0e59642653a2a9b460fe44639.zip
Simplify code. NFC.
llvm-svn: 230948
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp14
1 files changed, 3 insertions, 11 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
index 9466f4dd060..dcb2ab0a333 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
@@ -5418,17 +5418,9 @@ UpdateNodeOperands(SDNode *N, ArrayRef<SDValue> Ops) {
assert(N->getNumOperands() == NumOps &&
"Update with wrong number of operands");
- // Check to see if there is no change.
- bool AnyChange = false;
- for (unsigned i = 0; i != NumOps; ++i) {
- if (Ops[i] != N->getOperand(i)) {
- AnyChange = true;
- break;
- }
- }
-
- // No operands changed, just return the input node.
- if (!AnyChange) return N;
+ // If no operands changed just return the input node.
+ if (std::equal(Ops.begin(), Ops.end(), N->op_begin()))
+ return N;
// See if the modified node already exists.
void *InsertPos = nullptr;
OpenPOWER on IntegriCloud