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

Cullen Rhodes llvmlistbot at llvm.org
Wed Mar 27 05:36:29 PDT 2024


================
@@ -49,6 +49,11 @@ struct LinearizeConstant final : OpConversionPattern<arith::ConstantOp> {
     Location loc = constOp.getLoc();
     auto resType =
         getTypeConverter()->convertType<VectorType>(constOp.getType());
+
+    if (resType.isScalable() && !isa<SplatElementsAttr>(constOp.getValue()))
+      return rewriter.notifyMatchFailure(
+          loc, "Cannot linearize a constant scalable vector that's not a splt");
----------------
c-rhodes wrote:

```suggestion
          loc, "Cannot linearize a constant scalable vector that's not a splat");
```

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


More information about the Mlir-commits mailing list