[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:30 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 |
+ arith::FastMathFlags::ninf |
----------------
python3kgae wrote:
New knowledge learned :)
Updated.
https://github.com/llvm/llvm-project/pull/161395
More information about the Mlir-commits
mailing list