[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:57:10 PST 2018
renenkel added a comment.
Regarding Nemanjai's comment: "I find it really strange that this works. What is __builtin_inf() converted to __int128_t? Similarly with __builtin_nan()."
Do I understand correctly that testCase.input128 is the 128-bit int input to the conversion, and testCase.hi and lo are the hi and lo doubles of the long double that should be produced by the conversion?
In this case, as Nemanjai points out, INFINITY and QNAN don't make sense as inputs to the int128->long double conversion. Those four lines should be removed (in which case the corresponding #defines aren't needed and can be removed too).
================
Comment at: compiler-rt/test/builtins/Unit/ppc/floattitf_test.h:16
+struct testCase tests[] = {
+{ INFINITY, 0x1p+127, -0x1p+0 },
+{ -INFINITY, -0x1p+127, 0x0p+0 },
----------------
nemanjai wrote:
> I find it really strange that this works. What is `__builtin_inf()` converted to `__int128_t`? Similarly with `__builtin_nan()`.
Do I understand correctly that testCase.input128 is the 128-bit int input to the conversion, and testCase.hi and lo are the hi and lo doubles of the long double that should be produced by the conversion?
In this case, as Nemanjai points out, INFINITY and QNAN don't make sense as inputs to the int128->long double conversion. Those four lines should be removed (in which case the corresponding #defines aren't needed and can be removed too).
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D54313/new/
https://reviews.llvm.org/D54313
More information about the llvm-commits
mailing list