[Mlir-commits] [mlir] [mlir][vector] Add more patterns to Vector Linearize transformation (PR #136193)

James Newling llvmlistbot at llvm.org
Mon Apr 21 08:41:23 PDT 2025


================
@@ -369,6 +452,11 @@ struct LinearizeVectorExtract final
   LogicalResult
   matchAndRewrite(vector::ExtractOp extractOp, OpAdaptor adaptor,
                   ConversionPatternRewriter &rewriter) const override {
+    // Skip if result is not a vector type
+    if (!isa<VectorType>(extractOp.getType()))
+      return rewriter.notifyMatchFailure(extractOp,
+                                         "scalar extract is not supported.");
----------------
newling wrote:

```suggestion
                                         "scalar extract is not supported, because ...");
```
might to helpful!

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


More information about the Mlir-commits mailing list