diff mbox series

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

Message ID 32a7e3a7-fdb1-44d1-8cbb-65ecec04409f@linux.ibm.com
State New
Headers show
Series [ver,2] rs6000, update effective target for tests builtins-10*.c and, vec_perm-runnable-i128.c | expand

Commit Message

Carl Love July 16, 2024, 11:19 p.m. UTC
GCC maintainers:

Version 2, removed the lp64 from the target per discussion.  Tested and 
it is not needed.  The int128 qualifier is sufficient for the thest to 
report as unsupported on a 32-bit Power system.

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


------------------------------------------------------------------------
[PATCH] 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 17, 2024, 1:01 a.m. UTC | #1
On 7/16/24 6:19 PM, Carl Love wrote:
> 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.

The test cases themselves look good, but you need to update your git log entry
to not mention the lp64/64-bits since you removed them.  Yes, currently, only
64-bit targets support __int128, but our hope is that one day, even 32-bit
targets will as well.  So how about the following text instead?


...
use __int128 types that are not supported on all platforms.  Update the
tests to check int128 effective target to avoid unsupported type errors
on unsupported platforms.


Peter
Carl Love July 17, 2024, 4:09 p.m. UTC | #2
On 7/16/24 6:01 PM, Peter Bergner wrote:
> On 7/16/24 6:19 PM, Carl Love wrote:
>> 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.
> The test cases themselves look good, but you need to update your git log entry
> to not mention the lp64/64-bits since you removed them.
Yea, I didn't get the lp64 references clean up properly.  Sorry about that.
>   Yes, currently, only
> 64-bit targets support __int128, but our hope is that one day, even 32-bit
> targets will as well.  So how about the following text instead?
>
>
> ...
> use __int128 types that are not supported on all platforms.  Update the
> tests to check int128 effective target to avoid unsupported type errors
> on unsupported platforms.

OK, changed.

                          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..e2d3c990852 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 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..007892e2731 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 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..df1bf873cfc 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  int128 } } */
  /* { dg-require-effective-target vmx_hw } */
  /* { dg-options "-maltivec -O2 " } */