Skip to content

Commit b79654d

Browse files
committed
fixup! [mlir][vector][nfc] Improve comments in getCompressedMaskOp
Incorporate PR suggestions
1 parent 6dc87a6 commit b79654d

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

mlir/lib/Dialect/Vector/Transforms/VectorEmulateNarrowType.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,10 @@ using namespace mlir;
4545
#define DBGSNL() (llvm::dbgs() << "\n")
4646
#define LDBG(X) LLVM_DEBUG(DBGS() << X << "\n")
4747

48-
/// Returns a compressed mask. For example, when emulating `i8` with `i32` and
49-
/// when the number of source elements spans two `i32` elements, this method
50-
/// will compress `vector<8xi1>` into `vector<2xi1>`.
48+
/// Returns a compressed mask for the emulated vector. For example, when
49+
/// emulating an eight-element `i8` vector with `i32` (i.e. when the source
50+
/// elements span two dest elements), this method compresses `vector<8xi1>`
51+
/// into `vector<2xi1>`.
5152
///
5253
/// The compressed/output mask value is set iff any mask in the corresponding
5354
/// `numSrcElemsPerDest` range of uncompressed/input masks is set. E.g., if
@@ -63,8 +64,7 @@ using namespace mlir;
6364
///
6465
/// %mask = [1, 1, 0, 0]
6566
///
66-
/// `numFrontPadElems` is assumed to be strictly smaller than
67-
/// `numSrcElemsPerDest`.
67+
/// NOTE: `numFrontPadElems` must be strictly smaller than `numSrcElemsPerDest`.
6868
static FailureOr<Operation *> getCompressedMaskOp(OpBuilder &rewriter,
6969
Location loc, Value mask,
7070
int numSrcElems,

0 commit comments

Comments
 (0)