[Mlir-commits] [mlir] Fix unsupported transpose ops for scalable vectors in LowerVectorTransfer (PR #86163)

Benjamin Maxwell llvmlistbot at llvm.org
Fri Mar 22 03:24:22 PDT 2024


================
@@ -201,12 +205,19 @@ struct TransferWritePermutationLowering
     // Generate new transfer_write operation.
     Value newVec = rewriter.create<vector::TransposeOp>(
         op.getLoc(), op.getVector(), indices);
+
+    auto vectorType = cast<VectorType>(newVec.getType());
+
+    if (vectorType.isScalable() && !*vectorType.getScalableDims().end()) {
+      rewriter.eraseOp(newVec.getDefiningOp());
+      return failure();
----------------
MacDue wrote:

What's happening here? Did the test case previously lower with `TransferWritePermutationLowering`, and now `TransferWriteNonPermutationLowering` now manages to lower the same thing?

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


More information about the Mlir-commits mailing list