diff mbox series

PowerPC: Use __float128 instead of __ieee128 in tests.

Message ID 20201022221231.GA12376@ibm-toto.the-meissners.org
State New
Headers show
Series PowerPC: Use __float128 instead of __ieee128 in tests. | expand

Commit Message

Michael Meissner Oct. 22, 2020, 10:12 p.m. UTC
PowerPC: Use __float128 instead of __ieee128 in tests.

I have split all of these patches into separate patches to hopefully get them
into the tree.

Two of the tests used the __ieee128 keyword instead of __float128.  This
patch changes those cases to use the official keyword.

I have tested this patch with bootstrap builds on a little endian power9 system
running Linux.  With the other patches, I have built two full bootstrap builds
using this patch and the patches after this patch.  One build used the current
default for long double (IBM extended double) and the other build switched the
default to IEEE 128-bit.  I used the Advance Toolchain AT 14.0 compiler as the
library used by this compiler.  There are no regressions between the tests.
There are 3 fortran benchmarks (ieee/large_2.f90, default_format_2.f90, and
default_format_denormal_2.f90) that now pass.

Can I install this into the trunk?

We have gotten some requests to back port these changes to GCC 10.x.  At the
moment, I am not planning to do the back port, but I may need to in the future.

gcc/testsuite/
2020-10-22  Michael Meissner  <meissner@linux.ibm.com>

	* gcc.target/powerpc/float128-cmp2-runnable.c: Use __float128
	keyword instead of __ieee128.
	* gcc.target/powerpc/pr92796.c: Use __float128 keyword instead of
	__ieee128.
---
 gcc/testsuite/gcc.target/powerpc/float128-cmp2-runnable.c | 2 +-
 gcc/testsuite/gcc.target/powerpc/pr92796.c                | 8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)

Comments

will schmidt Oct. 26, 2020, 10:52 p.m. UTC | #1
On Thu, 2020-10-22 at 18:12 -0400, Michael Meissner via Gcc-patches wrote:
> PowerPC: Use __float128 instead of __ieee128 in tests.
> 
> I have split all of these patches into separate patches to hopefully get them
> into the tree.
> 
> Two of the tests used the __ieee128 keyword instead of __float128.  This
> patch changes those cases to use the official keyword.
> 
> I have tested this patch with bootstrap builds on a little endian power9 system
> running Linux.  With the other patches, I have built two full bootstrap builds
> using this patch and the patches after this patch.  One build used the current
> default for long double (IBM extended double) and the other build switched the
> default to IEEE 128-bit.  I used the Advance Toolchain AT 14.0 compiler as the
> library used by this compiler.  There are no regressions between the tests.
> There are 3 fortran benchmarks (ieee/large_2.f90, default_format_2.f90, and
> default_format_denormal_2.f90) that now pass.
> 
> Can I install this into the trunk?
> 
> We have gotten some requests to back port these changes to GCC 10.x.  At the
> moment, I am not planning to do the back port, but I may need to in the future.
> 
> gcc/testsuite/
> 2020-10-22  Michael Meissner  <meissner@linux.ibm.com>
> 
> 	* gcc.target/powerpc/float128-cmp2-runnable.c: Use __float128
> 	keyword instead of __ieee128.
> 	* gcc.target/powerpc/pr92796.c: Use __float128 keyword instead of
> 	__ieee128.
> ---
>  gcc/testsuite/gcc.target/powerpc/float128-cmp2-runnable.c | 2 +-
>  gcc/testsuite/gcc.target/powerpc/pr92796.c                | 8 ++++----
>  2 files changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/gcc/testsuite/gcc.target/powerpc/float128-cmp2-runnable.c b/gcc/testsuite/gcc.target/powerpc/float128-cmp2-runnable.c
> index d376a3ca68e..16b70877355 100644
> --- a/gcc/testsuite/gcc.target/powerpc/float128-cmp2-runnable.c
> +++ b/gcc/testsuite/gcc.target/powerpc/float128-cmp2-runnable.c
> @@ -18,7 +18,7 @@ int main(void)
>  {
>    int result;
>    double a_dble, b_dble;
> -  __ieee128 a_ieee128, b_ieee128;
> +  __float128 a_ieee128, b_ieee128;
> 
>    a_dble = 3.10;
>    b_dble = 3.10;
> diff --git a/gcc/testsuite/gcc.target/powerpc/pr92796.c b/gcc/testsuite/gcc.target/powerpc/pr92796.c
> index 1e671e175de..f2c6b8b7f5c 100644
> --- a/gcc/testsuite/gcc.target/powerpc/pr92796.c
> +++ b/gcc/testsuite/gcc.target/powerpc/pr92796.c
> @@ -4,14 +4,14 @@
> 
>  typedef union
>  {
> -  __ieee128 a;
> +  __float128 a;
>    int b;
>  } c;
> 
> -__ieee128
> -d (__ieee128 x)
> +__float128
> +d (__float128 x)
>  {
> -  __ieee128 g;
> +  __float128 g;
>    c h;
>    h.a = x;
>    g = h.b & 5;
> -- 
> 2.22.0
> 

lgtm, 
thanks
-Will


>
Segher Boessenkool Nov. 12, 2020, 7:26 p.m. UTC | #2
Hi,

On Thu, Oct 22, 2020 at 06:12:31PM -0400, Michael Meissner wrote:
> Two of the tests used the __ieee128 keyword instead of __float128.  This
> patch changes those cases to use the official keyword.

What is "official" about that?

Why make this change at all?  __ieee128 should work as well!  Did you
see failures without this patch?  Thos need fixing, then.


Segher
Michael Meissner Nov. 12, 2020, 9:44 p.m. UTC | #3
On Thu, Nov 12, 2020 at 01:26:32PM -0600, Segher Boessenkool wrote:
> Hi,
> 
> On Thu, Oct 22, 2020 at 06:12:31PM -0400, Michael Meissner wrote:
> > Two of the tests used the __ieee128 keyword instead of __float128.  This
> > patch changes those cases to use the official keyword.
> 
> What is "official" about that?
> 
> Why make this change at all?  __ieee128 should work as well!  Did you
> see failures without this patch?  Thos need fixing, then.

We document '__float128'.  We don't document '__ieee128'.  As I said, using
'__ieee128' internally was due some issues in the GCC 7 time frame,
particularly before we had the glibc changes.
Segher Boessenkool Nov. 12, 2020, 11:38 p.m. UTC | #4
On Thu, Nov 12, 2020 at 04:44:09PM -0500, Michael Meissner wrote:
> On Thu, Nov 12, 2020 at 01:26:32PM -0600, Segher Boessenkool wrote:
> > On Thu, Oct 22, 2020 at 06:12:31PM -0400, Michael Meissner wrote:
> > > Two of the tests used the __ieee128 keyword instead of __float128.  This
> > > patch changes those cases to use the official keyword.
> > 
> > What is "official" about that?
> > 
> > Why make this change at all?  __ieee128 should work as well!  Did you
> > see failures without this patch?  Thos need fixing, then.
> 
> We document '__float128'.  We don't document '__ieee128'.  As I said, using
> '__ieee128' internally was due some issues in the GCC 7 time frame,
> particularly before we had the glibc changes.

Well, it is a much clearer type as well: __ibm128 is also 128 bits, and
is also a floating point type.  But if __float128 now *always* means
__ieee128, then fine :-)

(But the manual needs fixing in four places, then.)

Is __float128 a standard type?  ("Standard", in whatever context -- not
just a rs6000 GCC thing, and what else uses it then, and/or will other
things use it in the future?)

Also, we then should change things so __ieee128 becomes really only a
legacy alias for __float128.

Thanks,


Segher
diff mbox series

Patch

diff --git a/gcc/testsuite/gcc.target/powerpc/float128-cmp2-runnable.c b/gcc/testsuite/gcc.target/powerpc/float128-cmp2-runnable.c
index d376a3ca68e..16b70877355 100644
--- a/gcc/testsuite/gcc.target/powerpc/float128-cmp2-runnable.c
+++ b/gcc/testsuite/gcc.target/powerpc/float128-cmp2-runnable.c
@@ -18,7 +18,7 @@  int main(void)
 {
   int result;
   double a_dble, b_dble;
-  __ieee128 a_ieee128, b_ieee128;
+  __float128 a_ieee128, b_ieee128;
   
   a_dble = 3.10;
   b_dble = 3.10;
diff --git a/gcc/testsuite/gcc.target/powerpc/pr92796.c b/gcc/testsuite/gcc.target/powerpc/pr92796.c
index 1e671e175de..f2c6b8b7f5c 100644
--- a/gcc/testsuite/gcc.target/powerpc/pr92796.c
+++ b/gcc/testsuite/gcc.target/powerpc/pr92796.c
@@ -4,14 +4,14 @@ 
 
 typedef union
 {
-  __ieee128 a;
+  __float128 a;
   int b;
 } c;
 
-__ieee128
-d (__ieee128 x)
+__float128
+d (__float128 x)
 {
-  __ieee128 g;
+  __float128 g;
   c h;
   h.a = x;
   g = h.b & 5;