summaryrefslogtreecommitdiff
path: root/mlir
diff options
context:
space:
mode:
Diffstat (limited to 'mlir')
-rw-r--r--mlir/lib/Dialect/Vector/IR/VectorOps.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/mlir/lib/Dialect/Vector/IR/VectorOps.cpp b/mlir/lib/Dialect/Vector/IR/VectorOps.cpp
index 5c139b5897d7..80ea03f6e8d8 100644
--- a/mlir/lib/Dialect/Vector/IR/VectorOps.cpp
+++ b/mlir/lib/Dialect/Vector/IR/VectorOps.cpp
@@ -1153,8 +1153,7 @@ ExtractOp::inferReturnTypes(MLIRContext *, std::optional<Location>,
ValueRange operands, DictionaryAttr attributes,
OpaqueProperties properties, RegionRange,
SmallVectorImpl<Type> &inferredReturnTypes) {
- ExtractOp::Adaptor op(operands, attributes
- *properties.as<ExtractOp::Properties *>());
+ ExtractOp::Adaptor op(operands, attributes, properties);
auto vectorType = op.getVector().getType().cast<VectorType>();
if (static_cast<int64_t>(op.getPosition().size()) == vectorType.getRank()) {
inferredReturnTypes.push_back(vectorType.getElementType());
@@ -2090,9 +2089,8 @@ ShuffleOp::inferReturnTypes(MLIRContext *, std::optional<Location>,
ValueRange operands, DictionaryAttr attributes,
OpaqueProperties properties, RegionRange,
SmallVectorImpl<Type> &inferredReturnTypes) {
- ShuffleOp::Adaptor op(operands, attributes
- *properties.as<ShuffleOp::Properties *>());
- auto v1Type = op.getV1().getType().cast<VectorType>();
+ ShuffleOp::Adaptor op(operands, attributes, properties);
+ auto v1Type = op.getV1().getType().cast<VectorType>();
auto v1Rank = v1Type.getRank();
// Construct resulting type: leading dimension matches mask
// length, all trailing dimensions match the operands.