[Mlir-commits] [mlir] [mlir][Transforms] `GreedyPatternRewriteDriver`: Do not CSE constants during iterations (PR #75897)

Matthias Springer llvmlistbot at llvm.org
Mon Dec 18 22:47:05 PST 2023


================
@@ -1352,9 +1352,11 @@ OpFoldResult arith::TruncIOp::fold(FoldAdaptor adaptor) {
       setOperand(src);
       return getResult();
     }
+
     // trunci(zexti(a)) -> a
     // trunci(sexti(a)) -> a
-    return src;
+    if (srcType == dstType)
+      return src;
   }
----------------
matthias-springer wrote:

Yes, these are part of #75887. (This commit depends on #75887.)


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


More information about the Mlir-commits mailing list