[gcc(refs/users/aoliva/heads/testme)] testsuite: vect: ppc: skip pr112325.c without vsx

Alexandre Oliva aoliva@gcc.gnu.org
Wed Mar 25 19:05:44 GMT 2026


https://gcc.gnu.org/g:e950e4312ab9537e1370cf260a8e29fe0007ee95

commit e950e4312ab9537e1370cf260a8e29fe0007ee95
Author: Alexandre Oliva <oliva@adacore.com>
Date:   Tue Mar 10 04:20:14 2026 -0300

    testsuite: vect: ppc: skip pr112325.c without vsx
    
    These two test variants hit the same problems on powerpc-elf with
    altivec without vsx: we can't vectorize the loops for various reasons.
    We need the peeling, we need strict-align disabled to inline memcpy,
    we need vect_widen_mult_qi_to_hi, but even with that, we fail to
    vectorize due to unsupported vector widening conversions.
    
    Extend the peeling param to all powerpc targets, but skip the test
    when vsx is not available.
    
    
    for  gcc/testsuite/ChangeLog
    
            * gcc.dg/vect/pr112325.c: Bump the peeled-insns count on all
            powerpc targets.  Skip the test on powerpc without vsx.
            * gcc.dg/vect/pr117888-1.c: Likewise.

Diff:
---
 gcc/testsuite/gcc.dg/vect/pr112325.c   | 6 +++++-
 gcc/testsuite/gcc.dg/vect/pr117888-1.c | 6 +++++-
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/gcc/testsuite/gcc.dg/vect/pr112325.c b/gcc/testsuite/gcc.dg/vect/pr112325.c
index d38059592825..e587854e4d0f 100644
--- a/gcc/testsuite/gcc.dg/vect/pr112325.c
+++ b/gcc/testsuite/gcc.dg/vect/pr112325.c
@@ -3,7 +3,7 @@
 /* { dg-require-effective-target vect_int } */
 /* { dg-require-effective-target vect_shift } */
 /* { dg-additional-options "-mavx2" { target x86_64-*-* i?86-*-* } } */
-/* { dg-additional-options "--param max-completely-peeled-insns=200" { target powerpc64*-*-* } } */
+/* { dg-additional-options "--param max-completely-peeled-insns=200" { target powerpc*-*-* } } */
 /* { dg-additional-options "-mlsx" { target loongarch64-*-* } } */
 /* { dg-additional-options "--param max-completely-peeled-insns=200 --param min-vect-loop-bound=0" { target s390*-*-* } } */
 
@@ -60,4 +60,8 @@ void ggml_vec_dot_q5_1_q8_1(const int n, float * restrict s, const void * restri
     *s = sumf;
 }
 
+/* Altivec alone cannot handle these loops; the widening for the multiplies
+   gets in the way.  */
+/* { dg-skip-if "" { powerpc*-*-* && { ! powerpc_vsx } } } */
+
 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/pr117888-1.c b/gcc/testsuite/gcc.dg/vect/pr117888-1.c
index 884aed2d9bee..674349c1b7db 100644
--- a/gcc/testsuite/gcc.dg/vect/pr117888-1.c
+++ b/gcc/testsuite/gcc.dg/vect/pr117888-1.c
@@ -3,7 +3,7 @@
 /* { dg-require-effective-target vect_int } */
 /* { dg-require-effective-target vect_shift } */
 /* { dg-additional-options "-mavx2" { target x86_64-*-* i?86-*-* } } */
-/* { dg-additional-options "--param max-completely-peeled-insns=200" { target powerpc64*-*-* } } */
+/* { dg-additional-options "--param max-completely-peeled-insns=200" { target powerpc*-*-* } } */
 /* { dg-additional-options "-mlsx" { target loongarch64-*-* } } */
 /* { dg-additional-options "--param max-completely-peeled-insns=200 --param min-vect-loop-bound=0" { target s390*-*-* } } */
 
@@ -70,4 +70,8 @@ void ggml_vec_dot_q5_1_q8_1(const int n, float * restrict s, const void * restri
   *s = sumf;
 }
 
+/* Altivec alone cannot handle these loops; the widening for the multiplies
+   gets in the way.  */
+/* { dg-skip-if "" { powerpc*-*-* && { ! powerpc_vsx } } } */
+
 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */


More information about the Gcc-cvs mailing list