[llvm] clarify NaN propagation in fptrunc (PR #68554)

Ralf Jung via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 9 01:35:28 PDT 2023


RalfJung wrote:

They should always return a quiet NaN, so if all 1s in the payload get truncated away it will naturally be the preferred NaN, without any special case.

But LLVM might optimize away cast roundtrips and then a signaling NaN might be returned and then we have to exclude the special case where the sNaN has all-0 payloads.

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


More information about the llvm-commits mailing list