[PATCH] D136097: InstSimplify: Fold fdiv nnan nsz x, 0 -> inf

Kevin P. Neal via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 18 07:59:17 PDT 2022


kpn added a comment.

In D136097#3863230 <https://reviews.llvm.org/D136097#3863230>, @spatel wrote:

> Ah, thanks for clearing that up. The "nsz" wording has always been a less solid than I'd like, but I'm not sure how to change it. 
> I suspect this transform would cause some fallout with users because it's a stretch to go from -0.0 isn't different than 0.0, therefore, -Inf isn't different than +Inf. There was a suggestion in a previous discussion that we really need entirely new FP types to use with fast-math-flags, so it's clear that -0.0, Inf, or NaN values simply do not exist when the corresponding compile flag is used, but I don't think anyone has looked seriously at implementing that. There's more discussion about the general problem here:
> https://github.com/llvm/llvm-project/issues/51601

I just pushed a change to the LangRef that will hopefully avoid misreadings like the one I made: 1b06307aa43c3d366843866985abcd95aedb78a2 <https://reviews.llvm.org/rG1b06307aa43c3d366843866985abcd95aedb78a2>


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D136097/new/

https://reviews.llvm.org/D136097



More information about the llvm-commits mailing list