From: Juergen Christ Date: Wed, 9 Jul 2025 09:19:50 +0000 (+0200) Subject: s390: Fix vector pattern tests for -m31. X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d6161f9e0d39670afca5afff0a5c56c258f43200;p=thirdparty%2Fgcc.git s390: Fix vector pattern tests for -m31. Vectorization of int patterns requires 64bit long type (at least the way the tests are coded). Fix this to only test for successful vectoriation on 64bit targets. Signed-off-by: Juergen Christ gcc/testsuite/ChangeLog: * gcc.target/s390/vector/pattern-avg-1.c: Fix on -m31. * gcc.target/s390/vector/pattern-mulh-1.c: Fix on -m31. * gcc.target/s390/vector/pattern-mulh-2.c: Fix on -m31. --- diff --git a/gcc/testsuite/gcc.target/s390/vector/pattern-avg-1.c b/gcc/testsuite/gcc.target/s390/vector/pattern-avg-1.c index 30c6ed47684..285ebc9a3a5 100644 --- a/gcc/testsuite/gcc.target/s390/vector/pattern-avg-1.c +++ b/gcc/testsuite/gcc.target/s390/vector/pattern-avg-1.c @@ -22,4 +22,5 @@ TEST(char,short,16) TEST(short,int,8) TEST(int,long,4) -/* { dg-final { scan-tree-dump-times "\.AVG_CEIL" 6 "optimized" } } */ +/* { dg-final { scan-tree-dump-times "\.AVG_CEIL" 6 "optimized" { target lp64 } } } */ +/* { dg-final { scan-tree-dump-times "\.AVG_CEIL" 4 "optimized" { target { ! lp64 } } } } */ diff --git a/gcc/testsuite/gcc.target/s390/vector/pattern-mulh-1.c b/gcc/testsuite/gcc.target/s390/vector/pattern-mulh-1.c index f71ef06c825..f0b37d63847 100644 --- a/gcc/testsuite/gcc.target/s390/vector/pattern-mulh-1.c +++ b/gcc/testsuite/gcc.target/s390/vector/pattern-mulh-1.c @@ -23,6 +23,5 @@ TEST(char,short,16,8) TEST(short,int,8,16) -TEST(int,long,4,32) -/* { dg-final { scan-tree-dump-times "\.MULH" 6 "optimized" } } */ +/* { dg-final { scan-tree-dump-times "\.MULH" 4 "optimized" } } */ diff --git a/gcc/testsuite/gcc.target/s390/vector/pattern-mulh-2.c b/gcc/testsuite/gcc.target/s390/vector/pattern-mulh-2.c index 6ac6855b1bd..2ff66b7ffaa 100644 --- a/gcc/testsuite/gcc.target/s390/vector/pattern-mulh-2.c +++ b/gcc/testsuite/gcc.target/s390/vector/pattern-mulh-2.c @@ -21,6 +21,7 @@ (((unsigned T2)l[i] * (unsigned T2)r[i]) >> S); \ } +TEST(int,long,4,32) TEST(long,__int128,2,64) -/* { dg-final { scan-tree-dump-times "\.MULH" 2 "optimized" } } */ +/* { dg-final { scan-tree-dump-times "\.MULH" 4 "optimized" } } */