[Mlir-commits] [mlir] [MLIR] support dynamic indexing of `vector.maskedload` in `VectorEmulateNarrowTypes` (PR #115070)
Han-Chung Wang
llvmlistbot at llvm.org
Mon Nov 11 16:17:49 PST 2024
================
@@ -549,29 +571,30 @@ struct ConvertVectorMaskedLoad final
? getConstantIntValue(linearizedInfo.intraDataOffset)
: 0;
- if (!foldedIntraVectorOffset) {
- // unimplemented case for dynamic intra vector offset
- return failure();
- }
-
- FailureOr<Operation *> newMask =
- getCompressedMaskOp(rewriter, loc, op.getMask(), origElements, scale,
- *foldedIntraVectorOffset);
+ auto maxIntraDataOffset = foldedIntraVectorOffset.value_or(scale - 1);
----------------
hanhanW wrote:
nit: spell the type out. The `auto` does not make the code more readable, IMHO.
https://llvm.org/docs/CodingStandards.html#use-auto-type-deduction-to-make-code-more-readable
https://github.com/llvm/llvm-project/pull/115070
More information about the Mlir-commits
mailing list