Skip to content

Commit 151bbfd

Browse files
committed
spacing/naming improvements
Signed-off-by: James Newling <[email protected]>
1 parent b58b837 commit 151bbfd

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

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

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5777,11 +5777,9 @@ class ShapeCastCreateMaskFolderTrailingOneDim final
57775777
};
57785778

57795779
/// Pattern to rewrite Y = ShapeCast(Broadcast(X)) as either
5780-
///
5781-
/// 1) Y = ShapeCast(X), or
5782-
/// 2) Y = Broadcast(X)
5783-
///
5784-
/// If both (1) and (2) are possible, (1) is chosen.
5780+
/// i) Y = ShapeCast(X), or
5781+
/// ii) Y = Broadcast(X)
5782+
/// If both (i) and (ii) are possible, (i) is chosen.
57855783
class ShapeCastBroadcastFolder final : public OpRewritePattern<ShapeCastOp> {
57865784
public:
57875785
using OpRewritePattern::OpRewritePattern;

mlir/test/Dialect/Vector/canonicalize.mlir

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1006,10 +1006,10 @@ func.func @canonicalize_broadcast_shapecast_to_broadcast(%arg0: vector<3xf32>) -
10061006

10071007
// -----
10081008

1009-
// CHECK-LABEL: func @canonicalize_broadcast_ones_shapecast_to_broadcast_ones
1009+
// CHECK-LABEL: func @canonicalize_broadcast_shapecast_to_broadcast_ones
10101010
// CHECK: vector.broadcast {{.*}} vector<1x1xi8> to vector<1x1x6x1x4xi8>
10111011
// CHECK-NOT: vector.shape_cast
1012-
func.func @canonicalize_broadcast_ones_shapecast_to_broadcast_ones(%arg0: vector<1x1xi8>) -> vector<1x1x6x1x4xi8> {
1012+
func.func @canonicalize_broadcast_shapecast_to_broadcast_ones(%arg0: vector<1x1xi8>) -> vector<1x1x6x1x4xi8> {
10131013
%0 = vector.broadcast %arg0 : vector<1x1xi8> to vector<6x4xi8>
10141014
%1 = vector.shape_cast %0 : vector<6x4xi8> to vector<1x1x6x1x4xi8>
10151015
return %1 : vector<1x1x6x1x4xi8>

0 commit comments

Comments
 (0)