[Mlir-commits] [mlir] [mlir][arith] Add mulf(x, 0) -> 0 to mulf folder (PR #161395)

Xiang Li llvmlistbot at llvm.org
Tue Sep 30 20:25:41 PDT 2025


================
@@ -1282,6 +1282,15 @@ OpFoldResult arith::MulFOp::fold(FoldAdaptor adaptor) {
   if (matchPattern(adaptor.getRhs(), m_OneFloat()))
     return getLhs();
 
+  arith::FastMathFlags fmf = getFastmath();
+  if (arith::bitEnumContainsAll(fmf, arith::FastMathFlags::nnan |
----------------
python3kgae wrote:

Updated.

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


More information about the Mlir-commits mailing list