[mlir] Use llvm::is_contained (NFC) (#140467)
This commit is contained in:
parent
25da043c55
commit
52ca511f64
@ -195,8 +195,7 @@ void mlir::populateMemRefToEmitCTypeConversion(TypeConverter &typeConverter) {
|
||||
[&](MemRefType memRefType) -> std::optional<Type> {
|
||||
if (!memRefType.hasStaticShape() ||
|
||||
!memRefType.getLayout().isIdentity() || memRefType.getRank() == 0 ||
|
||||
llvm::any_of(memRefType.getShape(),
|
||||
[](int64_t dim) { return dim == 0; })) {
|
||||
llvm::is_contained(memRefType.getShape(), 0)) {
|
||||
return {};
|
||||
}
|
||||
Type convertedElementType =
|
||||
|
||||
@ -5045,8 +5045,7 @@ OpFoldResult AffineLinearizeIndexOp::fold(FoldAdaptor adaptor) {
|
||||
if (getMultiIndex().size() == 1)
|
||||
return getMultiIndex().front();
|
||||
|
||||
if (llvm::any_of(adaptor.getMultiIndex(),
|
||||
[](Attribute a) { return a == nullptr; }))
|
||||
if (llvm::is_contained(adaptor.getMultiIndex(), nullptr))
|
||||
return nullptr;
|
||||
|
||||
if (!adaptor.getDynamicBasis().empty())
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user