================
@@ -5780,6 +5787,9 @@ DoubleAPFloat frexp(const DoubleAPFloat &Arg, int &Exp,
                        std::move(Second));
 }
 
+APInt DoubleAPFloat::getNaNPayload() const {
+  return Floats[0].getNaNPayload();
----------------
jcranmer-intel wrote:

I'm not entirely certain what the standard interpretation of NaN payloads is 
for the `ppc_fp128` type is, and I'd welcome feedback on the answer.

As best as I can tell from trying to read glibc source code, they only consider 
the payload of the first double to be part of the NaN payload, so this appears 
to be the "correct answer" for the payload of double-double.

I can look into making sure that we only emit the values for APFloat if the 
second double is all 0, and add some tests for weirder `ppc_fp128` values.

https://github.com/llvm/llvm-project/pull/190649
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to