middle-end: Fix two testisms on x86 after PFA [PR118754]

Message ID patch-19200-tamar@arm.com
State Committed
Commit aaf5f5027d3f29c6c0d836753dddac16ba94a49a
Headers
Series middle-end: Fix two testisms on x86 after PFA [PR118754] |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_gcc_build--master-arm success Build passed
linaro-tcwg-bot/tcwg_gcc_check--master-arm success Test passed
linaro-tcwg-bot/tcwg_gcc_build--master-aarch64 fail Patch failed to apply
linaro-tcwg-bot/tcwg_simplebootstrap_build--master-aarch64-bootstrap fail Patch failed to apply
linaro-tcwg-bot/tcwg_simplebootstrap_build--master-arm-bootstrap fail Patch failed to apply

Commit Message

Tamar Christina Feb. 10, 2025, 8:54 a.m. UTC
  Hi All,

These two tests now vectorize the result finding
loop with PFA and so the number of loops checked
fails.

This fixes them by adding #pragma GCC novector to
the testcases.

Regtested on x86_64-pc-linux-gnu on an AVX512 machine
with -m32, -m64 and test pass again.

Ok for master?

Thanks,
Tamar

gcc/testsuite/ChangeLog:

	PR testsuite/118754
	* gcc.dg/vect/vect-tail-nomask-1.c: Add novector.
	* gcc.target/i386/pr106010-8c.c: Likewise.

---




--
  

Comments

Richard Biener Feb. 10, 2025, 9:28 a.m. UTC | #1
On Mon, 10 Feb 2025, Tamar Christina wrote:

> Hi All,
> 
> These two tests now vectorize the result finding
> loop with PFA and so the number of loops checked
> fails.
> 
> This fixes them by adding #pragma GCC novector to
> the testcases.
> 
> Regtested on x86_64-pc-linux-gnu on an AVX512 machine
> with -m32, -m64 and test pass again.
> 
> Ok for master?

OK.

> Thanks,
> Tamar
> 
> gcc/testsuite/ChangeLog:
> 
> 	PR testsuite/118754
> 	* gcc.dg/vect/vect-tail-nomask-1.c: Add novector.
> 	* gcc.target/i386/pr106010-8c.c: Likewise.
> 
> ---
> diff --git a/gcc/testsuite/gcc.dg/vect/vect-tail-nomask-1.c b/gcc/testsuite/gcc.dg/vect/vect-tail-nomask-1.c
> index ee9ab2e9d910b7301641201e15e0443a1eca294b..116a7aefca6c362460710eeb76937570aeb9ed01 100644
> --- a/gcc/testsuite/gcc.dg/vect/vect-tail-nomask-1.c
> +++ b/gcc/testsuite/gcc.dg/vect/vect-tail-nomask-1.c
> @@ -72,6 +72,7 @@ run_test ()
>  
>    init_data (a, b, c, SIZE);
>    test_citer (a, b, c);
> +#pragma GCC novector
>    for (i = 0; i < SIZE; i++)
>      if (c[i] != a[i] + b[i])
>        __builtin_abort ();
> @@ -80,6 +81,7 @@ run_test ()
>  
>    init_data (a, b, c, SIZE);
>    test_viter (a, b, c, SIZE);
> +#pragma GCC novector
>    for (i = 0; i < SIZE; i++)
>      if (c[i] != a[i] + b[i])
>        __builtin_abort ();
> diff --git a/gcc/testsuite/gcc.target/i386/pr106010-8c.c b/gcc/testsuite/gcc.target/i386/pr106010-8c.c
> index 61ae131829dc7595044c2c6ac6fecbedb17ef8bc..76a3b3cbb6288a4de467051becca3393cc88dba8 100644
> --- a/gcc/testsuite/gcc.target/i386/pr106010-8c.c
> +++ b/gcc/testsuite/gcc.target/i386/pr106010-8c.c
> @@ -30,6 +30,7 @@ do_test (void)
>    __builtin_memset (ph_dst, 0, 2 * N * sizeof (_Float16));
>  
>    foo_ph (ph_dst);
> +#pragma GCC novector
>    for (int i = 0; i != N; i++)
>      {
>        if (ph_dst[i] != ph_src)
> 
> 
> 
> 
>
  

Patch

diff --git a/gcc/testsuite/gcc.dg/vect/vect-tail-nomask-1.c b/gcc/testsuite/gcc.dg/vect/vect-tail-nomask-1.c
index ee9ab2e9d910b7301641201e15e0443a1eca294b..116a7aefca6c362460710eeb76937570aeb9ed01 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-tail-nomask-1.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-tail-nomask-1.c
@@ -72,6 +72,7 @@  run_test ()
 
   init_data (a, b, c, SIZE);
   test_citer (a, b, c);
+#pragma GCC novector
   for (i = 0; i < SIZE; i++)
     if (c[i] != a[i] + b[i])
       __builtin_abort ();
@@ -80,6 +81,7 @@  run_test ()
 
   init_data (a, b, c, SIZE);
   test_viter (a, b, c, SIZE);
+#pragma GCC novector
   for (i = 0; i < SIZE; i++)
     if (c[i] != a[i] + b[i])
       __builtin_abort ();
diff --git a/gcc/testsuite/gcc.target/i386/pr106010-8c.c b/gcc/testsuite/gcc.target/i386/pr106010-8c.c
index 61ae131829dc7595044c2c6ac6fecbedb17ef8bc..76a3b3cbb6288a4de467051becca3393cc88dba8 100644
--- a/gcc/testsuite/gcc.target/i386/pr106010-8c.c
+++ b/gcc/testsuite/gcc.target/i386/pr106010-8c.c
@@ -30,6 +30,7 @@  do_test (void)
   __builtin_memset (ph_dst, 0, 2 * N * sizeof (_Float16));
 
   foo_ph (ph_dst);
+#pragma GCC novector
   for (int i = 0; i != N; i++)
     {
       if (ph_dst[i] != ph_src)