Skip to content

Commit a1bb750

Browse files
[mlir] Use a range constructor of DenseSet (NFC) (llvm#133355)
1 parent c8b69c9 commit a1bb750

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

mlir/lib/Dialect/Vector/IR/VectorOps.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -882,9 +882,8 @@ static LogicalResult verifyOutputShape(
882882
lhsContractingDimSet.insert(dimPair.first);
883883
rhsContractingDimSet.insert(dimPair.second);
884884
}
885-
DenseSet<int64_t> rhsBatchDimSet;
886-
for (auto &dimPair : batchDimMap)
887-
rhsBatchDimSet.insert(dimPair.second);
885+
DenseSet<int64_t> rhsBatchDimSet(llvm::from_range,
886+
llvm::make_second_range(batchDimMap));
888887

889888
// Add free and batch dimensions from 'lhsType' to 'expectedResultDims'.
890889
SmallVector<int64_t, 4> expectedResultDims;

0 commit comments

Comments
 (0)