testsuite/ix86: SSE2 is a prereq to _Float16 use

Message ID f3b2de01-c5c9-19dd-96bc-1cdd81240121@suse.com
State Committed
Commit d42c1598e52ec0a33fbcc4efa39f4c299d09a3fc
Headers
Series testsuite/ix86: SSE2 is a prereq to _Float16 use |

Commit Message

Jan Beulich June 28, 2022, 6:49 a.m. UTC
  When enabling AVX512FP via attribute or pragma, the _Float16 type would
remain unavailable when at initialization time SSE2 wouldn't be seen as
available for use. While this may hint at a wider underlying issue (like
the feature, the type may want providing dynamically, albeit this may be
challenging in particular for functions returning _Float16 yet having
the attribute specified after their return type), for now simply make
SSE2 available when targeting ix86.

gcc/testsuite/

	* gcc.target/i386/avx512fp16-reduce-op-2.c: Force SSE2 for i?86.
	* gcc.target/i386/pr99464.c: Likewise.
  

Comments

Uros Bizjak June 28, 2022, 6:53 a.m. UTC | #1
On Tue, Jun 28, 2022 at 8:49 AM Jan Beulich <jbeulich@suse.com> wrote:
>
> When enabling AVX512FP via attribute or pragma, the _Float16 type would
> remain unavailable when at initialization time SSE2 wouldn't be seen as
> available for use. While this may hint at a wider underlying issue (like
> the feature, the type may want providing dynamically, albeit this may be
> challenging in particular for functions returning _Float16 yet having
> the attribute specified after their return type), for now simply make
> SSE2 available when targeting ix86.
>
> gcc/testsuite/
>
>         * gcc.target/i386/avx512fp16-reduce-op-2.c: Force SSE2 for i?86.
>         * gcc.target/i386/pr99464.c: Likewise.

OK.

Thanks,
Uros.

>
> --- a/gcc/testsuite/gcc.target/i386/avx512fp16-reduce-op-2.c
> +++ b/gcc/testsuite/gcc.target/i386/avx512fp16-reduce-op-2.c
> @@ -1,5 +1,6 @@
>  /* { dg-do compile } */
>  /* { dg-options "-O2 -mprefer-vector-width=512 -fdump-tree-optimized" } */
> +/* { dg-additional-options "-msse2" { target i?86-*-* } } */
>
>  /* { dg-final { scan-tree-dump-times "\.REDUC_PLUS" 3 "optimized" } } */
>  /* { dg-final { scan-tree-dump-times "\.REDUC_MIN" 3 "optimized" } } */
> --- a/gcc/testsuite/gcc.target/i386/pr99464.c
> +++ b/gcc/testsuite/gcc.target/i386/pr99464.c
> @@ -1,6 +1,7 @@
>  /* PR target/99464 */
>  /* { dg-do compile } */
>  /* { dg-options "-O2" } */
> +/* { dg-additional-options "-msse2" { target i?86-*-* } } */
>
>  #pragma GCC target("arch=cannonlake")
>
  

Patch

--- a/gcc/testsuite/gcc.target/i386/avx512fp16-reduce-op-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx512fp16-reduce-op-2.c
@@ -1,5 +1,6 @@ 
 /* { dg-do compile } */
 /* { dg-options "-O2 -mprefer-vector-width=512 -fdump-tree-optimized" } */
+/* { dg-additional-options "-msse2" { target i?86-*-* } } */
 
 /* { dg-final { scan-tree-dump-times "\.REDUC_PLUS" 3 "optimized" } } */
 /* { dg-final { scan-tree-dump-times "\.REDUC_MIN" 3 "optimized" } } */
--- a/gcc/testsuite/gcc.target/i386/pr99464.c
+++ b/gcc/testsuite/gcc.target/i386/pr99464.c
@@ -1,6 +1,7 @@ 
 /* PR target/99464 */
 /* { dg-do compile } */
 /* { dg-options "-O2" } */
+/* { dg-additional-options "-msse2" { target i?86-*-* } } */
 
 #pragma GCC target("arch=cannonlake")