@@ -1263,20 +1263,23 @@ def Vector_ExtractStridedSliceOp :
12631263
12641264// TODO: Tighten semantics so that masks and inbounds can't be used
12651265// simultaneously within the same transfer op.
1266- def Vector_TransferReadOp
1267- : Vector_Op<"transfer_read",
1268- [DeclareOpInterfaceMethods<VectorTransferOpInterface>,
1269- DeclareOpInterfaceMethods<
1270- VectorUnrollOpInterface, ["getShapeForUnroll"]>,
1271- DeclareOpInterfaceMethods<MaskableOpInterface>,
1272- DeclareOpInterfaceMethods<MemoryEffectsOpInterface>,
1273- DeclareOpInterfaceMethods<ConditionallySpeculatable>,
1274- AttrSizedOperandSegments, DestinationStyleOpInterface]>,
1275- Arguments<(ins AnyShaped:$base, Variadic<Index>:$indices,
1276- AffineMapAttr:$permutation_map, AnyType:$padding,
1277- Optional<VectorOfNonZeroRankOf<[I1]>>:$mask,
1278- BoolArrayAttr:$in_bounds)>,
1279- Results<(outs AnyVectorOfAnyRank:$vector)> {
1266+ def Vector_TransferReadOp :
1267+ Vector_Op<"transfer_read", [
1268+ DeclareOpInterfaceMethods<VectorTransferOpInterface>,
1269+ DeclareOpInterfaceMethods<VectorUnrollOpInterface, ["getShapeForUnroll"]>,
1270+ DeclareOpInterfaceMethods<MaskableOpInterface>,
1271+ DeclareOpInterfaceMethods<MemoryEffectsOpInterface>,
1272+ DeclareOpInterfaceMethods<ConditionallySpeculatable>,
1273+ AttrSizedOperandSegments,
1274+ DestinationStyleOpInterface
1275+ ]>,
1276+ Arguments<(ins AnyShaped:$base,
1277+ Variadic<Index>:$indices,
1278+ AffineMapAttr:$permutation_map,
1279+ AnyType:$padding,
1280+ Optional<VectorOfNonZeroRankOf<[I1]>>:$mask,
1281+ BoolArrayAttr:$in_bounds)>,
1282+ Results<(outs AnyVectorOfAnyRank:$vector)> {
12801283
12811284 let summary = "Reads a supervector from memory into an SSA vector value.";
12821285
@@ -1465,25 +1468,30 @@ def Vector_TransferReadOp
14651468 }];
14661469
14671470 let builders = [
1468- /// 1. Builder that sets padding to zero and an empty mask (variant with
1469- /// attrs).
1470- OpBuilder<(ins "VectorType":$vectorType, "Value":$base,
1471- "ValueRange":$indices, "AffineMapAttr":$permutationMapAttr,
1472- "ArrayAttr":$inBoundsAttr)>,
1473- /// 2. Builder that sets padding to zero and an empty mask (variant
1474- /// without attrs).
1475- OpBuilder<(ins "VectorType":$vectorType, "Value":$base,
1476- "ValueRange":$indices, "AffineMap":$permutationMap,
1477- CArg<"std::optional<ArrayRef<bool>>", "::std::nullopt">:$inBounds)>,
1478- /// 3. Builder that sets permutation map to 'getMinorIdentityMap'.
1479- OpBuilder<(ins "VectorType":$vectorType, "Value":$base,
1480- "ValueRange":$indices, "Value":$padding,
1481- CArg<"std::optional<ArrayRef<bool>>", "::std::nullopt">:$inBounds)>,
1482- /// 4. Builder that sets padding to zero and permutation map to
1483- /// 'getMinorIdentityMap'.
1484- OpBuilder<(ins "VectorType":$vectorType, "Value":$base,
1485- "ValueRange":$indices,
1486- CArg<"std::optional<ArrayRef<bool>>", "::std::nullopt">:$inBounds)>,
1471+ /// 1. Builder that sets padding to zero and an empty mask (variant with attrs).
1472+ OpBuilder<(ins "VectorType":$vectorType,
1473+ "Value":$source,
1474+ "ValueRange":$indices,
1475+ "AffineMapAttr":$permutationMapAttr,
1476+ "ArrayAttr":$inBoundsAttr)>,
1477+ /// 2. Builder that sets padding to zero and an empty mask (variant without attrs).
1478+ OpBuilder<(ins "VectorType":$vectorType,
1479+ "Value":$source,
1480+ "ValueRange":$indices,
1481+ "AffineMap":$permutationMap,
1482+ CArg<"std::optional<ArrayRef<bool>>", "::std::nullopt">:$inBounds)>,
1483+ /// 3. Builder that sets permutation map to 'getMinorIdentityMap'.
1484+ OpBuilder<(ins "VectorType":$vectorType,
1485+ "Value":$source,
1486+ "ValueRange":$indices,
1487+ "Value":$padding,
1488+ CArg<"std::optional<ArrayRef<bool>>", "::std::nullopt">:$inBounds)>,
1489+ /// 4. Builder that sets padding to zero and permutation map to
1490+ /// 'getMinorIdentityMap'.
1491+ OpBuilder<(ins "VectorType":$vectorType,
1492+ "Value":$source,
1493+ "ValueRange":$indices,
1494+ CArg<"std::optional<ArrayRef<bool>>", "::std::nullopt">:$inBounds)>,
14871495 ];
14881496
14891497 let extraClassDeclaration = [{
@@ -1503,20 +1511,23 @@ def Vector_TransferReadOp
15031511
15041512// TODO: Tighten semantics so that masks and inbounds can't be used
15051513// simultaneously within the same transfer op.
1506- def Vector_TransferWriteOp
1507- : Vector_Op<"transfer_write",
1508- [DeclareOpInterfaceMethods<VectorTransferOpInterface>,
1509- DeclareOpInterfaceMethods<
1510- VectorUnrollOpInterface, ["getShapeForUnroll"]>,
1511- DeclareOpInterfaceMethods<MaskableOpInterface>,
1512- DeclareOpInterfaceMethods<MemoryEffectsOpInterface>,
1513- DeclareOpInterfaceMethods<ConditionallySpeculatable>,
1514- AttrSizedOperandSegments, DestinationStyleOpInterface]>,
1515- Arguments<(ins AnyVectorOfAnyRank:$valueToStore, AnyShaped:$base,
1516- Variadic<Index>:$indices, AffineMapAttr:$permutation_map,
1517- Optional<VectorOfNonZeroRankOf<[I1]>>:$mask,
1518- BoolArrayAttr:$in_bounds)>,
1519- Results<(outs Optional<AnyRankedTensor>:$result)> {
1514+ def Vector_TransferWriteOp :
1515+ Vector_Op<"transfer_write", [
1516+ DeclareOpInterfaceMethods<VectorTransferOpInterface>,
1517+ DeclareOpInterfaceMethods<VectorUnrollOpInterface, ["getShapeForUnroll"]>,
1518+ DeclareOpInterfaceMethods<MaskableOpInterface>,
1519+ DeclareOpInterfaceMethods<MemoryEffectsOpInterface>,
1520+ DeclareOpInterfaceMethods<ConditionallySpeculatable>,
1521+ AttrSizedOperandSegments,
1522+ DestinationStyleOpInterface
1523+ ]>,
1524+ Arguments<(ins AnyVectorOfAnyRank:$valueToStore,
1525+ AnyShaped:$base,
1526+ Variadic<Index>:$indices,
1527+ AffineMapAttr:$permutation_map,
1528+ Optional<VectorOfNonZeroRankOf<[I1]>>:$mask,
1529+ BoolArrayAttr:$in_bounds)>,
1530+ Results<(outs Optional<AnyRankedTensor>:$result)> {
15201531
15211532 let summary = "The vector.transfer_write op writes a supervector to memory.";
15221533
0 commit comments