[Mlir-commits] [mlir] [MLIR] support dynamic indexing in `VectorEmulateNarrowTypes` (PR #114169)
Diego Caballero
llvmlistbot at llvm.org
Sun Nov 3 20:05:20 PST 2024
================
@@ -129,26 +128,80 @@ static FailureOr<Operation *> getCompressedMaskOp(OpBuilder &rewriter,
return newMask;
}
+/// Extracts 1-D subvector from a 1-D vector. It is a wrapper function for
+/// emitting `vector.extract_strided_slice`.
static Value extractSubvectorFrom(RewriterBase &rewriter, Location loc,
- VectorType extractType, Value vector,
+ VectorType extractType, Value source,
int64_t frontOffset, int64_t subvecSize) {
+ auto vectorType = dyn_cast<VectorType>(source.getType());
+ assert(
+ (vectorType && vectorType.getRank() == 1 && extractType.getRank() == 1) &&
----------------
dcaballe wrote:
nit: no need for `( )` for `&&` predicates
https://github.com/llvm/llvm-project/pull/114169
More information about the Mlir-commits
mailing list