[Mlir-commits] [mlir] [mlir][vector] Fold transpose(broadcast(shape_cast)) to broadcast (PR #215940)
Federico Bruzzone
llvmlistbot at llvm.org
Fri Oct 23 04:46:12 PDT 2026
================
@@ -7682,6 +7682,17 @@ class FoldTransposeFromElements final : public OpRewritePattern<TransposeOp> {
}
};
+/// Returns the indices of `type`'s non-unit dimensions in increasing order.
+/// Scalable dimensions are included even when their static size is 1, since
+/// their runtime size is not guaranteed to be 1.
+static SmallVector<int64_t> nonUnitAxes(VectorType type) {
----------------
FedericoBruzzone wrote:
Could it move next to `FoldTransposeShapeCastBroadcast`? Note that `static` is also redundant inside the anonymous namespace.
https://github.com/llvm/llvm-project/pull/215940
More information about the Mlir-commits
mailing list