[Mlir-commits] [mlir] Fix complex abs corner cases. (PR #88373)

Ivan Butygin llvmlistbot at llvm.org
Mon Jun 10 11:49:34 PDT 2024


Hardcode84 wrote:

I believe, current implementation is incorrect for case `(0, 0)` and `fastmath=nnan`.
`div(min, max) == div(0, 0) == nan == poison` which is propagated for all the following ops
`cmpf uno == either false or poison` (not sure about actual llvm semantics here)
both for `false` and `poison` select will return poison.
In practice, we are getting nan results instead of expected 0s.

Not sure if previous version was formally correct, but at least we were getting correct results for this case.

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


More information about the Mlir-commits mailing list