We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ff55d01 commit 7946cc4Copy full SHA for 7946cc4
llvm/utils/TableGen/CodeGenDAGPatterns.cpp
@@ -2023,10 +2023,13 @@ void TreePatternNode::InlinePatternFragments(
2023
if (ChildAlternatives[i].empty())
2024
return;
2025
2026
- for (const auto &NewChild : ChildAlternatives[i])
2027
- assert((Child->getPredicateCalls().empty() ||
2028
- NewChild->getPredicateCalls() == Child->getPredicateCalls()) &&
2029
- "Non-empty child predicate clobbered!");
+ assert(Child->getPredicateCalls().empty() ||
+ llvm::all_of(ChildAlternatives[i],
+ [&](const TreePatternNodePtr &NewChild) {
+ return NewChild->getPredicateCalls() ==
2030
+ Child->getPredicateCalls();
2031
+ }) &&
2032
+ "Non-empty child predicate clobbered!");
2033
}
2034
2035
// The end result is an all-pairs construction of the resultant pattern.
0 commit comments