[Mlir-commits] [mlir] [mlir][vector] Add support for scalable vectors to VectorLinearize (PR #86786)

Benjamin Maxwell llvmlistbot at llvm.org
Wed Mar 27 14:46:24 PDT 2024


================
@@ -317,3 +317,8 @@ SmallVector<OpFoldResult> vector::getMixedSizesXfer(bool hasTensorSemantics,
                          : memref::getMixedSizes(rewriter, loc, base);
   return mixedSourceDims;
 }
+
+bool vector::isLinearizableVector(VectorType type) {
+  auto numScalableDims = llvm::count(type.getScalableDims(), true);
+  return ((type.getRank() > 1) && (numScalableDims <= 1));
----------------
MacDue wrote:

Both the outer and inner parentheses are redundant here: `type.getRank() > 1 && numScalableDims <= 1`

https://github.com/llvm/llvm-project/pull/86786


More information about the Mlir-commits mailing list