[Mlir-commits] [mlir] Fix unsupported transpose ops for scalable vectors in LowerVectorTransfer (PR #86163)
Benjamin Maxwell
llvmlistbot at llvm.org
Fri Mar 22 02:49:16 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 this for? It returns `failure()` so this is a case where the pattern should not apply (and any changes rolled-back, I think), but it's erasing an operation.
https://github.com/llvm/llvm-project/pull/86163
More information about the Mlir-commits
mailing list