[Mlir-commits] [mlir] [MLIR] Fix VectorEmulateNarrowType constant op mask bug (PR #116064)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Wed Nov 13 19:04:02 PST 2024
================
@@ -129,6 +132,45 @@ static FailureOr<Operation *> getCompressedMaskOp(OpBuilder &rewriter,
auto denseAttr = DenseElementsAttr::get(newMaskType, newMaskValues);
newMask = rewriter.create<arith::ConstantOp>(loc, newMaskType, denseAttr);
}
+ } else if (constantOp) {
+ assert(shape.size() == 1 && "expected 1-D mask");
+ // Rearrange the original mask values to cover the whole potential loading
+ // region. For example, in the case of using byte-size for emulation, given
+ // the following mask:
+ //
+ // %mask = vector.constant_mask [0, 1, 0, 1, 0, 0] : vector<6xi2>
----------------
lialan wrote:
You are right, and I am embarrassed by missing this part while doing self proof reading. Thanks!
https://github.com/llvm/llvm-project/pull/116064
More information about the Mlir-commits
mailing list