[PATCH] D54313: [compiler-rt][builtins][PowerPC] Add floattitf builtin compiler-rt method support for PowerPC
Robert Enenkel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 6 14:30:06 PST 2018
renenkel added a comment.
Regarding Nemanjai's comment, "I would have expected that every __int128_t value is a number (i.e. not a NAN) and none of them produce an infinity." Correct. No 128-bit int converted to a long double should produce NaN or Inf. However, we have to decide what should happen when a long double NaN or Inf gets converted to a 128-bit int. It seems reasonable that +-Inf gets converted to the largest/smallest int128 of the same sign. But there is not really any natural value for NaN. Unless there is a standard governing this, I would suggest it should be undefined. We've chosen to retain the same bit pattern of the long double NaN in the converted int128. The gcc conversion produces a strange arbitrary number 0x80...080...080...080...0. I'm not sure what the value would be in matching this, but it would be possible with a special case, should that be deemed necessary.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D54313/new/
https://reviews.llvm.org/D54313
More information about the llvm-commits
mailing list