Skip to content

Commit fcf2152

Browse files
committed
Feedback
1 parent 9cccbd5 commit fcf2152

File tree

1 file changed

+15
-13
lines changed

1 file changed

+15
-13
lines changed

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

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6661,7 +6661,9 @@ LogicalResult MaskOp::verify() {
66616661
///
66626662
/// %0 = user_op %a : vector<8xf32>
66636663
///
6664-
/// Empty `vector.mask` with passthru operand are handled by the canonicalizer.
6664+
/// Empty `vector.mask` with passthru operand are handled by the canonicalizer
6665+
/// as it requires creating new operations.
6666+
66656667
static LogicalResult foldEmptyMaskOp(MaskOp maskOp, MaskOp::FoldAdaptor adaptor,
66666668
SmallVectorImpl<OpFoldResult> &results) {
66676669
if (!maskOp.isEmpty() || maskOp.hasPassthru())
@@ -6697,18 +6699,18 @@ LogicalResult MaskOp::fold(FoldAdaptor adaptor,
66976699
return success();
66986700
}
66996701

6700-
// Canonialize empty `vector.mask` operations that can't be handled in
6701-
// `VectorMask::fold`.
6702-
//
6703-
// Example 1: Empty `vector.mask` with passthru operand.
6704-
//
6705-
// %0 = vector.mask %mask, %passthru { vector.yield %a : vector<8xf32> } :
6706-
// vector<8xi1> -> vector<8xf32>
6707-
//
6708-
// becomes:
6709-
//
6710-
// %0 = arith.select %mask, %a, %passthru : vector<8xf32>
6711-
//
6702+
/// Canonialize empty `vector.mask` operations that can't be handled in
6703+
/// `VectorMask::fold` as they require creating new operations.
6704+
///
6705+
/// Example 1: Empty `vector.mask` with passthru operand.
6706+
///
6707+
/// %0 = vector.mask %mask, %passthru { vector.yield %a : vector<8xf32> } :
6708+
/// vector<8xi1> -> vector<8xf32>
6709+
///
6710+
/// becomes:
6711+
///
6712+
/// %0 = arith.select %mask, %a, %passthru : vector<8xf32>
6713+
///
67126714
class CanonializeEmptyMaskOp : public OpRewritePattern<MaskOp> {
67136715
using OpRewritePattern::OpRewritePattern;
67146716

0 commit comments

Comments
 (0)