[Mlir-commits] [mlir] [MLIR][Tensor] Perform shape inference via in-place modification (NFC) (PR #111593)

Mehdi Amini llvmlistbot at llvm.org
Wed Oct 9 00:40:46 PDT 2024


================
@@ -4332,21 +4332,25 @@ LogicalResult PackOp::canonicalize(PackOp packOp, PatternRewriter &rewriter) {
           rewriter.create<tensor::CastOp>(loc, newSrcType, packOp.getSource());
     }
     Value dest = packOp.getDest();
-    if (destShape != packOp.getDestType().getShape()) {
+    Type originalResultType = packOp.getDestType();
----------------
joker-eph wrote:

This won't simplify the code further as far a I can tell? Am I missing a cast?

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


More information about the Mlir-commits mailing list