[Mlir-commits] [mlir] [mlir][vector] Hoist transfer pairs when the source is AssumeAlignmentOp (PR #144809)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Sun Jun 22 17:48:08 PDT 2025


================
@@ -313,11 +315,13 @@ void mlir::linalg::hoistRedundantVectorTransfers(Operation *root,
         return WalkResult::advance();
 
       auto *source = transferRead.getBase().getDefiningOp();
-      if (source && isa_and_nonnull<ViewLikeOpInterface>(source))
+      if (source && isa_and_nonnull<ViewLikeOpInterface>(source) &&
+          !isa<memref::AssumeAlignmentOp>(source))
----------------
xiangzh1 wrote:

the mem souce of AssumeAlignmentOp maybe also an viewlike operation, we should also check AssumeAlignmentOp’s memref operand. I give an similar PR at [144843](https://github.com/llvm/llvm-project/pull/144843), (and also a probem case in it). 

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


More information about the Mlir-commits mailing list