@@ -2520,19 +2520,19 @@ unsigned OperationLegalizer::applyCostModelToPatterns(
25202520 return minDepth;
25212521
25222522 // Sort the patterns by those likely to be the most beneficial.
2523- std ::stable_sort (patternsByDepth. begin (), patternsByDepth. end () ,
2524- [](const std::pair<const Pattern *, unsigned > &lhs,
2525- const std::pair<const Pattern *, unsigned > &rhs) {
2526- // First sort by the smaller pattern legalization
2527- // depth.
2528- if (lhs.second != rhs.second )
2529- return lhs.second < rhs.second ;
2530-
2531- // Then sort by the larger pattern benefit.
2532- auto lhsBenefit = lhs.first ->getBenefit ();
2533- auto rhsBenefit = rhs.first ->getBenefit ();
2534- return lhsBenefit > rhsBenefit;
2535- });
2523+ llvm ::stable_sort (patternsByDepth,
2524+ [](const std::pair<const Pattern *, unsigned > &lhs,
2525+ const std::pair<const Pattern *, unsigned > &rhs) {
2526+ // First sort by the smaller pattern legalization
2527+ // depth.
2528+ if (lhs.second != rhs.second )
2529+ return lhs.second < rhs.second ;
2530+
2531+ // Then sort by the larger pattern benefit.
2532+ auto lhsBenefit = lhs.first ->getBenefit ();
2533+ auto rhsBenefit = rhs.first ->getBenefit ();
2534+ return lhsBenefit > rhsBenefit;
2535+ });
25362536
25372537 // Update the legalization pattern to use the new sorted list.
25382538 patterns.clear ();
0 commit comments