[llvm] LangRef: Clarify behaviors of nsz in fast math flag (PR #137567)
YunQiang Su via llvm-commits
llvm-commits at lists.llvm.org
Wed May 14 04:34:17 PDT 2025
wzssyqa wrote:
> Calling this out as a special case for min/max isn't the right way to express this. Given that this is the one standardized area with fuzzy signed zero handling, I think we should try to fit the definition such that this works (i.e. it's not permitted to randomly introduce a 0 sign bit).
>
> I'm not aware of any transforms taking advantage of producing a -0 where there wasn't one to begin with. That is, we are allowed to produce either sign zero if one of the operation inputs is a -0, or the operation would naturally produce a -0 based on its inputs
Any suggestions?
Just remove
```
For calls to anything other than a min/max intrinsic, arithmetic instructions, select, and phi, if the result is zero, the returned value can be a zero of either sign.
```
?
https://github.com/llvm/llvm-project/pull/137567
More information about the llvm-commits
mailing list