[Mlir-commits] [mlir] [mlir][complex] Prevent underflow in complex.abs (PR #76316)

Kai Sasaki llvmlistbot at llvm.org
Wed Dec 27 13:45:58 PST 2023


https://github.com/Lewuathe commented:

@rikhuijzer Thanks for giving me the pointer to the past discussion. The discussion originated from the issue in flang but the problem this is trying to solve could be more general.

- complex.abs cannot treat the full range of f64 due to overflow. The conversion to standard should be responsible for.
- complex dialect can be regarded as the user of lower level dialect. We can let it control how the lower level ops are used.
- complex.sqrt is already taking care of this case. Treating the f64 precision similarly in a dialect is consistent.

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


More information about the Mlir-commits mailing list