Skip to content

Commit 572dfef

Browse files
committed
[SelectionDAG] Use llvm::any_of to simplify a loop. NFC
1 parent b1dcd6b commit 572dfef

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3444,12 +3444,10 @@ void SelectionDAGISel::SelectCodeCommon(SDNode *NodeToMatch,
34443444
// such nodes must have a chain, it suffices to check ChainNodesMatched.
34453445
// We need to perform this check before potentially modifying one of the
34463446
// nodes via MorphNode.
3447-
bool MayRaiseFPException = false;
3448-
for (auto *N : ChainNodesMatched)
3449-
if (mayRaiseFPException(N) && !N->getFlags().hasNoFPExcept()) {
3450-
MayRaiseFPException = true;
3451-
break;
3452-
}
3447+
bool MayRaiseFPException =
3448+
llvm::any_of(ChainNodesMatched, [this](SDNode *N) {
3449+
return mayRaiseFPException(N) && !N->getFlags().hasNoFPExcept();
3450+
});
34533451

34543452
// Create the node.
34553453
MachineSDNode *Res = nullptr;

0 commit comments

Comments
 (0)