summaryrefslogtreecommitdiff
path: root/mlir/lib/Dialect/Utils/ReshapeOpsUtils.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'mlir/lib/Dialect/Utils/ReshapeOpsUtils.cpp')
-rw-r--r--mlir/lib/Dialect/Utils/ReshapeOpsUtils.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/mlir/lib/Dialect/Utils/ReshapeOpsUtils.cpp b/mlir/lib/Dialect/Utils/ReshapeOpsUtils.cpp
index 94fa2d3de22f..853889269d0f 100644
--- a/mlir/lib/Dialect/Utils/ReshapeOpsUtils.cpp
+++ b/mlir/lib/Dialect/Utils/ReshapeOpsUtils.cpp
@@ -162,7 +162,7 @@ ArrayAttr mlir::getReassociationIndicesAttribute(
SmallVector<Attribute, 4> reassociationAttr =
llvm::to_vector<4>(llvm::map_range(
reassociation, [&](const ReassociationIndices &indices) -> Attribute {
- return b.getI64ArrayAttr(indices).cast<Attribute>();
+ return cast<Attribute>(b.getI64ArrayAttr(indices));
}));
return b.getArrayAttr(reassociationAttr);
}
@@ -267,7 +267,7 @@ LogicalResult mlir::reshapeLikeShapesAreCompatible(
}
bool mlir::hasNonIdentityLayout(Type type) {
- if (auto memrefType = type.dyn_cast<MemRefType>())
+ if (auto memrefType = dyn_cast<MemRefType>(type))
return !memrefType.getLayout().isIdentity();
return false;
}