[Mlir-commits] [mlir] [MLIR] VectorEmulateNarrowType to support loading of unaligned vectors (PR #113411)
Han-Chung Wang
llvmlistbot at llvm.org
Mon Oct 28 13:45:36 PDT 2024
================
@@ -102,6 +129,36 @@ static FailureOr<Operation *> getCompressedMaskOp(OpBuilder &rewriter,
return newMask;
}
+static std::optional<int64_t>
+getIntraVectorOffset(ConversionPatternRewriter &rewriter, Location loc,
+ const memref::LinearizedMemRefInfo linearizedInfo) {
+ auto foldedIntraVectorOffset = getValueOrCreateConstantIndexOp(
+ rewriter, loc, linearizedInfo.intraVectorOffset);
+ return getConstantIntValue(foldedIntraVectorOffset);
+}
----------------
hanhanW wrote:
I think we don't need the method. You can just replace all the usages with `getConstantIntValue(linearizedInfo.intraVectorOffset)`.
https://github.com/llvm/llvm-project/pull/113411
More information about the Mlir-commits
mailing list