Skip to content

Commit

Permalink
canonicalize -> fold
Browse files Browse the repository at this point in the history
  • Loading branch information
Groverkss committed Dec 3, 2024
1 parent 1ea6677 commit e3419a9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mlir/test/Dialect/Vector/canonicalize.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -818,11 +818,11 @@ func.func @fold_extract_shapecast_negative(%arg0 : vector<16xf32>) -> vector<4x2

// -----

// CHECK-LABEL: canonicalize_extract_shapecast_to_shapecast
// CHECK-LABEL: fold_extract_shapecast_to_shapecast
// CHECK-SAME: (%[[ARG:.+]]: vector<3x4xf32>)
// CHECK: %[[R:.+]] = vector.shape_cast %[[ARG]] : vector<3x4xf32> to vector<12xf32>
// CHECK: return %[[R]]
func.func @canonicalize_extract_shapecast_to_shapecast(%arg0 : vector<3x4xf32>) -> vector<12xf32> {
func.func @fold_extract_shapecast_to_shapecast(%arg0 : vector<3x4xf32>) -> vector<12xf32> {
%0 = vector.shape_cast %arg0 : vector<3x4xf32> to vector<1x12xf32>
%r = vector.extract %0[0] : vector<12xf32> from vector<1x12xf32>
return %r : vector<12xf32>
Expand Down

0 comments on commit e3419a9

Please sign in to comment.