diff mbox series

rs6000, update effective target for tests builtins-10*.c and, vec_perm-runnable-i128.c

Message ID 9aff08ae-1ce6-4f78-b8ab-7be1687d1e7d@linux.ibm.com
State New
Headers show
Series rs6000, update effective target for tests builtins-10*.c and, vec_perm-runnable-i128.c | expand

Commit Message

Carl Love July 15, 2024, 10:43 p.m. UTC
GCC maintainers:

The tests:

   tests builtins-10-runnable.c
   tests builtins-10.c
   vec_perm-runnable-i128.c

generate the following errors when run on a 32-bit BE Power system with 
GCC configured with multilib enabled.

FAIL: gcc.target/powerpc/builtins-10-runnable.c (test for excess errors)
FAIL: gcc.target/powerpc/builtins-10.c (test for excess errors)
FAIL: gcc.target/powerpc/vec_perm-runnable-i128.c (test for excess errors)

The tests use the __int128 type which is not supported on 32-bit 
systems.  The test for int128 and lp64 was added to the test cases to 
disable the test on 32-bit systems and systems that do not support the 
__int128 type.  The three tests now report "# of unsupported tests 1".

The patch has been tested on a Power 9 BE system with multilib enabled 
for GCC and on a Power 10 LE 64-bit configuration with no regression 
failures.

Please let me know if the patch is acceptable for mainline. Thanks.

                            Carl

--------------------------------------------------------------
rs6000, update effective target for tests builtins-10*.c and 
vec_perm-runnable-i128.c

The tests:

   tests builtins-10-runnable.c
   tests builtins-10.c
   vec_perm-runnable-i128.c

use __int128 types that are not supported on all platforms.  The
__int128 type is only supported on 64-bit platforms.  Need to check that
the platform is 64-bits and support the __int128 type.  Add the int128 and
lp64 flags to the target test.

gcc/testsuite/ChangeLog:
     * gcc.target/powerpc/builtins-10-runnable.c: Add
     target int128 and lp64.
     * gcc.target/powerpc/builtins-10.c: Add
     target int128 and lp64.
     * gcc.target/powerpc/vec_perm-runnable-i128: Add
     target int128 and lp64.
---
  gcc/testsuite/gcc.target/powerpc/builtins-10-runnable.c   | 2 +-
  gcc/testsuite/gcc.target/powerpc/builtins-10.c            | 2 +-
  gcc/testsuite/gcc.target/powerpc/vec_perm-runnable-i128.c | 2 +-
  3 files changed, 3 insertions(+), 3 deletions(-)

Comments

Peter Bergner July 15, 2024, 11:14 p.m. UTC | #1
On 7/15/24 5:43 PM, Carl Love wrote:
> -/* { dg-do run } */
> +/* { dg-do run { target { lp64 } && { int128 } } } */

Why isn't this just:

  /* { dg-do run { target int128 } } */

???   The int128 test should disable this on 32-bit systems just fine.

Peter
Carl Love July 16, 2024, 4:25 p.m. UTC | #2
Peter:

On 7/15/24 4:14 PM, Peter Bergner wrote:
> On 7/15/24 5:43 PM, Carl Love wrote:
>> -/* { dg-do run } */
>> +/* { dg-do run { target { lp64 } && { int128 } } } */
> Why isn't this just:
>
>    /* { dg-do run { target int128 } } */
>
> ???   The int128 test should disable this on 32-bit systems just fine.

I agree it seems like that should work.  I had tried just the int128 
initially but was still getting errors so I added the

{ lp64 } and that fixed it.

That said, I went back and tried dg-do run { target int128 } again on one of the files.  Now it seems to work?  Hmm, I guess I must have had a typo or something when I first tried it.  I will try fixing the patch for all of the test files and retest to see if just int128 works.

                     Carl
diff mbox series

Patch

diff --git a/gcc/testsuite/gcc.target/powerpc/builtins-10-runnable.c 
b/gcc/testsuite/gcc.target/powerpc/builtins-10-runnable.c
index dede08358e1..da3011d4c00 100644
--- a/gcc/testsuite/gcc.target/powerpc/builtins-10-runnable.c
+++ b/gcc/testsuite/gcc.target/powerpc/builtins-10-runnable.c
@@ -1,4 +1,4 @@ 
-/* { dg-do run } */
+/* { dg-do run { target { lp64 } && { int128 } } } */
  /* { dg-require-effective-target vmx_hw } */
  /* { dg-options "-maltivec -O2 " } */

diff --git a/gcc/testsuite/gcc.target/powerpc/builtins-10.c 
b/gcc/testsuite/gcc.target/powerpc/builtins-10.c
index b00f53cfc62..bc3cdb69305 100644
--- a/gcc/testsuite/gcc.target/powerpc/builtins-10.c
+++ b/gcc/testsuite/gcc.target/powerpc/builtins-10.c
@@ -1,4 +1,4 @@ 
-/* { dg-do compile } */
+/* { dg-do compile { target { lp64 } && { int128 } } } */
  /* { dg-options "-O2 -maltivec" } */
  /* { dg-require-effective-target powerpc_altivec } */
  /* { dg-final { scan-assembler-times "xxsel" 6 } } */
diff --git a/gcc/testsuite/gcc.target/powerpc/vec_perm-runnable-i128.c 
b/gcc/testsuite/gcc.target/powerpc/vec_perm-runnable-i128.c
index 0e0d77bcb84..c9b8a2053b7 100644
--- a/gcc/testsuite/gcc.target/powerpc/vec_perm-runnable-i128.c
+++ b/gcc/testsuite/gcc.target/powerpc/vec_perm-runnable-i128.c
@@ -1,4 +1,4 @@ 
-/* { dg-do run } */
+/* { dg-do run { target { lp64 } && { int128 } } } */
  /* { dg-require-effective-target vmx_hw } */
  /* { dg-options "-maltivec -O2 " } */