[Mlir-commits] [mlir] [MLIR][Tensor, MemRef] Fold expand_shape and collapse_shape if identity (PR #80658)

James Newling llvmlistbot at llvm.org
Mon Feb 5 05:28:22 PST 2024


================
@@ -2223,10 +2223,6 @@ LogicalResult ExpandShapeOp::verify() {
   MemRefType srcType = getSrcType();
   MemRefType resultType = getResultType();
 
-  if (srcType.getRank() >= resultType.getRank())
----------------
newling wrote:

It's not really possible to do this, because of the reassociation indices. I've added some tests to illustrate this in the (upcoming) update. 

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


More information about the Mlir-commits mailing list