Skip to content

Commit 6363446

Browse files
committed
comment
1 parent cd97f24 commit 6363446

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

mlir/include/mlir/Dialect/Vector/Transforms/VectorRewritePatterns.h

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,8 +161,17 @@ void populateVectorTransferCollapseInnerMostContiguousDimsPatterns(
161161
void populateSinkVectorOpsPatterns(RewritePatternSet &patterns,
162162
PatternBenefit benefit = 1);
163163

164-
/// Patterns that remove redundant Vector Ops by re-ordering them with
165-
/// memory Ops:
164+
/// Patterns that remove redundant Vector Ops by merging them with load/store
165+
/// ops
166+
/// ```
167+
/// vector.load %arg0[%arg1] : memref<?xf32>, vector<4xf32>
168+
/// vector.extract %0[1] : f32 from vector<4xf32>
169+
/// ```
170+
/// Gets converted to:
171+
/// ```
172+
/// %c1 = arith.constant 1 : index
173+
/// %0 = arith.addi %arg1, %c1 overflow<nsw> : index
174+
/// %1 = memref.load %arg0[%0] : memref<?xf32>
166175
void populateSinkVectorMemOpsPatterns(RewritePatternSet &patterns,
167176
PatternBenefit benefit = 1);
168177

0 commit comments

Comments
 (0)