[Mlir-commits] [mlir] [mlir][arith] Add mulf(x, 0) -> 0 to mulf folder (PR #161395)
Jakub Kuderski
llvmlistbot at llvm.org
Thu Oct 2 04:22:14 PDT 2025
================
@@ -1282,6 +1282,13 @@ OpFoldResult arith::MulFOp::fold(FoldAdaptor adaptor) {
if (matchPattern(adaptor.getRhs(), m_OneFloat()))
return getLhs();
+ if (arith::bitEnumContainsAll(getFastmath(), arith::FastMathFlags::nnan |
+ arith::FastMathFlags::nsz)) {
----------------
kuhar wrote:
I tried to check this with Alive: https://alive2.llvm.org/ce/z/wvNkdy
https://github.com/llvm/llvm-project/pull/161395
More information about the Mlir-commits
mailing list