[Mlir-commits] [mlir] [MLIR] Fix VectorEmulateNarrowType constant op mask bug (PR #116064)
Andrzej WarzyĆski
llvmlistbot at llvm.org
Fri Nov 15 06:57:58 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");
----------------
banach-space wrote:
> I'd suggest to move this check before "TypeSwitch" and see what's happening. If it does not break anything, we don't need to make arith.constant case special.
+1
No need to handle complexities that are not required. And if they do become required then at least we'll have a good motivating example to inform the design :)
https://github.com/llvm/llvm-project/pull/116064
More information about the Mlir-commits
mailing list