[Mlir-commits] [mlir] [mlir][math] Fix the sign of zero-base results in the fpowi expansion (PR #237452)

Mattéo Rizza Murgier llvmlistbot at llvm.org
Sun Nov 1 12:42:32 PST 2026


https://github.com/matteo-rm commented:

Division by zero is well defined for floats so I don't think we need special cases at all here. The whole block can probably be replaced by:
```cpp
if (isNegative)
    res = arith::DivFOp::create(b, baseType, one, res);
```
`arith.divf %one, %signed_zero` correctly folds to +-inf

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


More information about the Mlir-commits mailing list