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

Carl Love cel@linux.ibm.com
Wed Jul 17 16:15:06 GMT 2024


GCC maintainers:

Version 3, in version 2, the ChangeLog didn't get updated to remove the 
LP64 references.  Fixed that and updated the patch description per the 
feedback from Peter.

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
----------------------------------------------------------------------------------------------------------
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.  Update the
tests to check int128 effective target to avoid unsupported type errors
on unsupported platforms.

gcc/testsuite/ChangeLog:
     * gcc.target/powerpc/builtins-10-runnable.c: Add
     target int128.
     * gcc.target/powerpc/builtins-10.c: Add
     target int128.
     * gcc.target/powerpc/vec_perm-runnable-i128: Add
     target int128.
---
  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(-)

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 " } */

-- 
2.45.2




More information about the Gcc-patches mailing list