diff mbox series

[committed] testsuite: Fix up amx* dg-do run tests with older binutils

Message ID 20200930115142.GO2176@tucnak
State New
Headers show
Series [committed] testsuite: Fix up amx* dg-do run tests with older binutils | expand

Commit Message

Jakub Jelinek Sept. 30, 2020, 11:51 a.m. UTC
On Fri, Sep 18, 2020 at 04:31:55PM +0800, Hongyu Wang via Gcc-patches wrote:
> Very Appreciated for your review again
> 
> I just update the patch with adding XSAVE dependency and use
> __builtin_cpu_supports for runtime test.

Several tests FAIL when using older binutils that don't support AMX.

Fixed thusly, tested on x86_64-linux -m32/-m64, committed to trunk as
obvious:

2020-09-30  Jakub Jelinek  <jakub@redhat.com>

	* gcc.target/i386/amxint8-dpbssd-2.c: Require effective targets
	amx_tile and amx_int8.
	* gcc.target/i386/amxint8-dpbsud-2.c: Likewise.
	* gcc.target/i386/amxint8-dpbusd-2.c: Likewise.
	* gcc.target/i386/amxint8-dpbuud-2.c: Likewise.
	* gcc.target/i386/amxbf16-dpbf16ps-2.c: Require effective targets
	amx_tile and amx_bf16.
	* gcc.target/i386/amxtile-2.c: Require effective target amx_tile.



	Jakub

Comments

Hongyu Wang Sept. 30, 2020, 2:05 p.m. UTC | #1
Thanks for the fix! I forgot that we don't have builtin check for
target-supports.exp.

Will update these once we implement AMX with builtins.

Jakub Jelinek <jakub@redhat.com> 于2020年9月30日周三 下午7:51写道:

> On Fri, Sep 18, 2020 at 04:31:55PM +0800, Hongyu Wang via Gcc-patches
> wrote:
> > Very Appreciated for your review again
> >
> > I just update the patch with adding XSAVE dependency and use
> > __builtin_cpu_supports for runtime test.
>
> Several tests FAIL when using older binutils that don't support AMX.
>
> Fixed thusly, tested on x86_64-linux -m32/-m64, committed to trunk as
> obvious:
>
> 2020-09-30  Jakub Jelinek  <jakub@redhat.com>
>
>         * gcc.target/i386/amxint8-dpbssd-2.c: Require effective targets
>         amx_tile and amx_int8.
>         * gcc.target/i386/amxint8-dpbsud-2.c: Likewise.
>         * gcc.target/i386/amxint8-dpbusd-2.c: Likewise.
>         * gcc.target/i386/amxint8-dpbuud-2.c: Likewise.
>         * gcc.target/i386/amxbf16-dpbf16ps-2.c: Require effective targets
>         amx_tile and amx_bf16.
>         * gcc.target/i386/amxtile-2.c: Require effective target amx_tile.
>
> --- gcc/testsuite/gcc.target/i386/amxint8-dpbssd-2.c.jj 2020-09-29
> 11:32:02.950602758 +0200
> +++ gcc/testsuite/gcc.target/i386/amxint8-dpbssd-2.c    2020-09-30
> 13:16:08.186445881 +0200
> @@ -1,4 +1,6 @@
>  /* { dg-do run { target { ! ia32 } } } */
> +/* { dg-require-effective-target amx_tile } */
> +/* { dg-require-effective-target amx_int8 } */
>  /* { dg-options "-O2 -mamx-tile -mamx-int8" } */
>  #include <immintrin.h>
>
> --- gcc/testsuite/gcc.target/i386/amxint8-dpbsud-2.c.jj 2020-09-29
> 11:32:02.950602758 +0200
> +++ gcc/testsuite/gcc.target/i386/amxint8-dpbsud-2.c    2020-09-30
> 13:16:23.715221450 +0200
> @@ -1,4 +1,6 @@
>  /* { dg-do run { target { ! ia32 } } } */
> +/* { dg-require-effective-target amx_tile } */
> +/* { dg-require-effective-target amx_int8 } */
>  /* { dg-options "-O2 -mamx-tile -mamx-int8" } */
>  #include <immintrin.h>
>
> --- gcc/testsuite/gcc.target/i386/amxint8-dpbusd-2.c.jj 2020-09-29
> 11:32:02.950602758 +0200
> +++ gcc/testsuite/gcc.target/i386/amxint8-dpbusd-2.c    2020-09-30
> 13:16:28.998145100 +0200
> @@ -1,4 +1,6 @@
>  /* { dg-do run { target { ! ia32 } } } */
> +/* { dg-require-effective-target amx_tile } */
> +/* { dg-require-effective-target amx_int8 } */
>  /* { dg-options "-O2 -mamx-tile -mamx-int8" } */
>  #include <immintrin.h>
>
> --- gcc/testsuite/gcc.target/i386/amxint8-dpbuud-2.c.jj 2020-09-29
> 11:32:02.950602758 +0200
> +++ gcc/testsuite/gcc.target/i386/amxint8-dpbuud-2.c    2020-09-30
> 13:16:35.770047224 +0200
> @@ -1,4 +1,6 @@
>  /* { dg-do run { target { ! ia32 } } } */
> +/* { dg-require-effective-target amx_tile } */
> +/* { dg-require-effective-target amx_int8 } */
>  /* { dg-options "-O2 -mamx-tile -mamx-int8" } */
>  #include <immintrin.h>
>
> --- gcc/testsuite/gcc.target/i386/amxbf16-dpbf16ps-2.c.jj       2020-09-29
> 11:32:02.949602773 +0200
> +++ gcc/testsuite/gcc.target/i386/amxbf16-dpbf16ps-2.c  2020-09-30
> 13:15:41.079837637 +0200
> @@ -1,4 +1,6 @@
>  /* { dg-do run { target { ! ia32 } } } */
> +/* { dg-require-effective-target amx_tile } */
> +/* { dg-require-effective-target amx_bf16 } */
>  /* { dg-options "-O2 -mamx-tile -mamx-bf16" } */
>  #include <immintrin.h>
>
> --- gcc/testsuite/gcc.target/i386/amxtile-2.c.jj        2020-09-29
> 11:32:02.950602758 +0200
> +++ gcc/testsuite/gcc.target/i386/amxtile-2.c   2020-09-30
> 13:16:57.972726339 +0200
> @@ -1,4 +1,5 @@
>  /* { dg-do run { target { ! ia32 } } } */
> +/* { dg-require-effective-target amx_tile } */
>  /* { dg-options "-O2 -mamx-tile " } */
>  #include <immintrin.h>
>
>
>
>         Jakub
>
>
diff mbox series

Patch

--- gcc/testsuite/gcc.target/i386/amxint8-dpbssd-2.c.jj	2020-09-29 11:32:02.950602758 +0200
+++ gcc/testsuite/gcc.target/i386/amxint8-dpbssd-2.c	2020-09-30 13:16:08.186445881 +0200
@@ -1,4 +1,6 @@ 
 /* { dg-do run { target { ! ia32 } } } */
+/* { dg-require-effective-target amx_tile } */
+/* { dg-require-effective-target amx_int8 } */
 /* { dg-options "-O2 -mamx-tile -mamx-int8" } */
 #include <immintrin.h>
 
--- gcc/testsuite/gcc.target/i386/amxint8-dpbsud-2.c.jj	2020-09-29 11:32:02.950602758 +0200
+++ gcc/testsuite/gcc.target/i386/amxint8-dpbsud-2.c	2020-09-30 13:16:23.715221450 +0200
@@ -1,4 +1,6 @@ 
 /* { dg-do run { target { ! ia32 } } } */
+/* { dg-require-effective-target amx_tile } */
+/* { dg-require-effective-target amx_int8 } */
 /* { dg-options "-O2 -mamx-tile -mamx-int8" } */
 #include <immintrin.h>
 
--- gcc/testsuite/gcc.target/i386/amxint8-dpbusd-2.c.jj	2020-09-29 11:32:02.950602758 +0200
+++ gcc/testsuite/gcc.target/i386/amxint8-dpbusd-2.c	2020-09-30 13:16:28.998145100 +0200
@@ -1,4 +1,6 @@ 
 /* { dg-do run { target { ! ia32 } } } */
+/* { dg-require-effective-target amx_tile } */
+/* { dg-require-effective-target amx_int8 } */
 /* { dg-options "-O2 -mamx-tile -mamx-int8" } */
 #include <immintrin.h>
 
--- gcc/testsuite/gcc.target/i386/amxint8-dpbuud-2.c.jj	2020-09-29 11:32:02.950602758 +0200
+++ gcc/testsuite/gcc.target/i386/amxint8-dpbuud-2.c	2020-09-30 13:16:35.770047224 +0200
@@ -1,4 +1,6 @@ 
 /* { dg-do run { target { ! ia32 } } } */
+/* { dg-require-effective-target amx_tile } */
+/* { dg-require-effective-target amx_int8 } */
 /* { dg-options "-O2 -mamx-tile -mamx-int8" } */
 #include <immintrin.h>
 
--- gcc/testsuite/gcc.target/i386/amxbf16-dpbf16ps-2.c.jj	2020-09-29 11:32:02.949602773 +0200
+++ gcc/testsuite/gcc.target/i386/amxbf16-dpbf16ps-2.c	2020-09-30 13:15:41.079837637 +0200
@@ -1,4 +1,6 @@ 
 /* { dg-do run { target { ! ia32 } } } */
+/* { dg-require-effective-target amx_tile } */
+/* { dg-require-effective-target amx_bf16 } */
 /* { dg-options "-O2 -mamx-tile -mamx-bf16" } */
 #include <immintrin.h>
 
--- gcc/testsuite/gcc.target/i386/amxtile-2.c.jj	2020-09-29 11:32:02.950602758 +0200
+++ gcc/testsuite/gcc.target/i386/amxtile-2.c	2020-09-30 13:16:57.972726339 +0200
@@ -1,4 +1,5 @@ 
 /* { dg-do run { target { ! ia32 } } } */
+/* { dg-require-effective-target amx_tile } */
 /* { dg-options "-O2 -mamx-tile " } */
 #include <immintrin.h>