Skip to content

Commit aa99292

Browse files
committed
minor tweaks
1 parent e673522 commit aa99292

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

mlir/lib/Dialect/Vector/IR/VectorOps.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6267,9 +6267,9 @@ OpFoldResult vector::TransposeOp::fold(FoldAdaptor adaptor) {
62676267
// %0 = vector.transpose %arg, [0, 1] : vector<2x2xi8> to vector<2x2xi8>
62686268
// %0 = vector.transpose %arg, [1, 0] : vector<1x1xi8> to vector<1x1xi8>
62696269
//
6270-
// Example of what NOT to fold:
6271-
//
6270+
// Example of what not to fold:
62726271
// %0 = vector.transpose %arg, [1, 0] : vector<2x2xi8> to vector<2x2xi8>
6272+
//
62736273
if (getSourceVectorType() == getResultVectorType() &&
62746274
isOrderPreserving(*this))
62756275
return getVector();
@@ -6514,8 +6514,9 @@ struct TransposeToShapeCast final
65146514

65156515
void vector::TransposeOp::getCanonicalizationPatterns(
65166516
RewritePatternSet &results, MLIRContext *context) {
6517-
results.add<FoldTransposeCreateMask, TransposeFolder, FoldTransposeSplat,
6518-
FoldTransposeBroadcast, TransposeToShapeCast>(context);
6517+
results.add<FoldTransposeBroadcast, FoldTransposeCreateMask,
6518+
FoldTransposeSplat, TransposeFolder, TransposeToShapeCast>(
6519+
context);
65196520
}
65206521

65216522
//===----------------------------------------------------------------------===//

mlir/test/Dialect/Vector/canonicalize/vector-shape-cast.mlir

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
// RUN: mlir-opt %s -split-input-file -canonicalize | FileCheck %s
22

3+
// This file contains tests where there a vector.shape_cast gets canonicalized, or where a
4+
// vector.shape_cast is the result of a canonicalization. Not all such tests must live in this file.
35

46
// +----------------------------------------
57
// Tests of BroadcastToShapeCast

mlir/test/Dialect/Vector/single-fold.mlir

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,5 +35,4 @@ func.func @fold_insert_in_single_pass() -> vector<2xf16> {
3535
// CHECK: arith.constant dense<[0.000000e+00, 2.500000e+00]> : vector<2xf16>
3636
%0 = vector.insert %c2, %cst [%c1] : f16 into vector<2xf16>
3737
return %0 : vector<2xf16>
38-
}
39-
38+
}

0 commit comments

Comments
 (0)