[Mlir-commits] [mlir] [mlir][memref] memref.view canonicalizations fixes (PR #173237)
Mehdi Amini
llvmlistbot at llvm.org
Mon Dec 22 03:56:58 PST 2025
================
@@ -3675,7 +3675,8 @@ OpFoldResult ViewOp::fold(FoldAdaptor adaptor) {
MemRefType sourceMemrefType = getSource().getType();
MemRefType resultMemrefType = getResult().getType();
- if (resultMemrefType == sourceMemrefType && resultMemrefType.hasStaticShape())
+ if (resultMemrefType == sourceMemrefType &&
+ resultMemrefType.hasStaticShape() && isZeroInteger(getByteShift()))
----------------
joker-eph wrote:
Thanks!
https://github.com/llvm/llvm-project/pull/173237
More information about the Mlir-commits
mailing list