Skip to content

Commit 93d41d8

Browse files
authored
[LV] Use ElementCount::isKnownLT to factor code (NFC) (#130596)
1 parent 1fe4631 commit 93d41d8

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

llvm/lib/Transforms/Vectorize/LoopVectorize.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4393,10 +4393,7 @@ void LoopVectorizationPlanner::emitInvalidCostRemarks(
43934393
sort(InvalidCosts, [&Numbering](RecipeVFPair &A, RecipeVFPair &B) {
43944394
if (Numbering[A.first] != Numbering[B.first])
43954395
return Numbering[A.first] < Numbering[B.first];
4396-
const auto &LHS = A.second;
4397-
const auto &RHS = B.second;
4398-
return std::make_tuple(LHS.isScalable(), LHS.getKnownMinValue()) <
4399-
std::make_tuple(RHS.isScalable(), RHS.getKnownMinValue());
4396+
return ElementCount::isKnownLT(A.second, B.second);
44004397
});
44014398

44024399
// For a list of ordered recipe-VF pairs:

0 commit comments

Comments
 (0)