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

Benjamin Maxwell llvmlistbot at llvm.org
Fri Mar 22 07:55:19 PDT 2024


================
@@ -269,7 +280,7 @@ struct TransferWriteNonPermutationLowering
                                     missingInnerDim.size());
     // Mask: add unit dims at the end of the shape.
     Value newMask;
-    if (op.getMask())
+    if (op.getMask() && !op.getVectorType().isScalable())
----------------
MacDue wrote:

In `TransferWritePermutationLowering` the rewrite fails (i.e. it does nothing), erasing the transpose is just doing a cleanup. Here the rewrite succeeds but the mask is omitted, which changes the semantics of the operation, which could lead to incorrect results.

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


More information about the Mlir-commits mailing list