[Mlir-commits] [mlir] Add Vector-dialect interleave-to-shuffle pattern (PR #91800)

Benoit Jacob llvmlistbot at llvm.org
Mon May 13 07:14:17 PDT 2024


================
@@ -77,9 +78,33 @@ class UnrollInterleaveOp : public OpRewritePattern<vector::InterleaveOp> {
   int64_t targetRank = 1;
 };
 
+class InterleaveToShuffle : public OpRewritePattern<vector::InterleaveOp> {
----------------
bjacob wrote:

> Note, `vector.shuffle` doesn't support scalable vectors:
> 
>     * [[vector][mlir] Restrict vector.shuffle to fixed-width vectors #88733](https://github.com/llvm/llvm-project/pull/88733)
> 
> 
> You can just disable this pattern when `sourceType.isScalable()` returns `true`. It would be nice to have a test to verity that as well.

Thanks, done!

> Also, would you mind adding a comment with IR `BEFORE` and `AFTER` (similar to what's been added to `UnrollInterleaveOp`)? I know that right now this is a small file and the pattern is self-explanatory, but these files tend to grow a lot at which point comments can be really helpful.

Good idea. Done!

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


More information about the Mlir-commits mailing list