[MLIR] Fix vector::TransferWriteOp builder losing permutation map

Supervectorizer pass uses this builder and loses the permutation map.

Reviewed By: nicolasvasilache

Differential Revision: https://reviews.llvm.org/D92145
This commit is contained in:
Max Kudryavtsev 2020-12-03 09:51:47 -08:00 committed by Stella Stamenova
parent 1860331932
commit 636db7f87c
2 changed files with 3 additions and 4 deletions
mlir
lib/Dialect/Vector
test/Dialect/Affine/SuperVectorize

View File

@ -2171,12 +2171,11 @@ void TransferWriteOp::build(OpBuilder &builder, OperationState &result,
build(builder, result, vector, memref, indices, permMap, maskedArrayAttr);
}
/// Builder that sets permutation map to 'getMinorIdentityMap'.
void TransferWriteOp::build(OpBuilder &builder, OperationState &result,
Value vector, Value memref, ValueRange indices,
AffineMap permutationMap) {
build(builder, result, vector, memref, indices,
/*maybeMasked=*/ArrayRef<bool>{});
build(builder, result, vector, memref, indices, permutationMap,
/*maybeMasked=*/ArrayAttr());
}
static ParseResult parseTransferWriteOp(OpAsmParser &parser,

View File

@ -56,7 +56,7 @@ func @double_loop_nest(%a: memref<20x30xf32>, %b: memref<20xf32>) {
// VECNEST: vector.transfer_read
// VECNEST-NEXT: affine.for %{{.*}} = 0 to 30 {
// VECNEST: vector.transfer_read
// VECNEST-NEXT: vector.transfer_write
// VECNEST-NEXT: vector.transfer_write %{{.*}}, %{{.*}}[%{{.*}}, %{{.*}}] {permutation_map = #{{.*}}}
// VECNEST-NEXT: }
// VECNEST-NEXT: vector.transfer_write
// VECNEST: }