[SelectionDAG] Use llvm::any_of to simplify a loop. NFC

This commit is contained in:
Craig Topper 2022-05-04 18:29:15 -07:00
parent b1dcd6bafb
commit 572dfef1db
1 changed files with 4 additions and 6 deletions

View File

@ -3444,12 +3444,10 @@ void SelectionDAGISel::SelectCodeCommon(SDNode *NodeToMatch,
// such nodes must have a chain, it suffices to check ChainNodesMatched.
// We need to perform this check before potentially modifying one of the
// nodes via MorphNode.
bool MayRaiseFPException = false;
for (auto *N : ChainNodesMatched)
if (mayRaiseFPException(N) && !N->getFlags().hasNoFPExcept()) {
MayRaiseFPException = true;
break;
}
bool MayRaiseFPException =
llvm::any_of(ChainNodesMatched, [this](SDNode *N) {
return mayRaiseFPException(N) && !N->getFlags().hasNoFPExcept();
});
// Create the node.
MachineSDNode *Res = nullptr;