@@ -1263,23 +1263,20 @@ def Vector_ExtractStridedSliceOp :
1263
1263
1264
1264
// TODO: Tighten semantics so that masks and inbounds can't be used
1265
1265
// simultaneously within the same transfer op.
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:$source,
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)> {
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)> {
1283
1280
1284
1281
let summary = "Reads a supervector from memory into an SSA vector value.";
1285
1282
@@ -1468,30 +1465,25 @@ def Vector_TransferReadOp :
1468
1465
}];
1469
1466
1470
1467
let builders = [
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)>,
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)>,
1495
1487
];
1496
1488
1497
1489
let extraClassDeclaration = [{
@@ -1511,23 +1503,20 @@ def Vector_TransferReadOp :
1511
1503
1512
1504
// TODO: Tighten semantics so that masks and inbounds can't be used
1513
1505
// simultaneously within the same transfer op.
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:$source,
1526
- Variadic<Index>:$indices,
1527
- AffineMapAttr:$permutation_map,
1528
- Optional<VectorOfNonZeroRankOf<[I1]>>:$mask,
1529
- BoolArrayAttr:$in_bounds)>,
1530
- Results<(outs Optional<AnyRankedTensor>:$result)> {
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)> {
1531
1520
1532
1521
let summary = "The vector.transfer_write op writes a supervector to memory.";
1533
1522
@@ -1663,7 +1652,7 @@ def Vector_TransferWriteOp :
1663
1652
/// ops of other dialects.
1664
1653
Value getValue() { return getVector(); }
1665
1654
1666
- MutableOperandRange getDpsInitsMutable() { return getSourceMutable (); }
1655
+ MutableOperandRange getDpsInitsMutable() { return getBaseMutable (); }
1667
1656
}];
1668
1657
1669
1658
let hasFolder = 1;
0 commit comments