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 <jchr...@linux.ibm.com>

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.
---
 gcc/testsuite/gcc.target/s390/vector/pattern-avg-1.c  | 3 ++-
 gcc/testsuite/gcc.target/s390/vector/pattern-mulh-1.c | 3 +--
 gcc/testsuite/gcc.target/s390/vector/pattern-mulh-2.c | 3 ++-
 3 files changed, 5 insertions(+), 4 deletions(-)

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 30c6ed476846..285ebc9a3a56 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 f71ef06c8252..f0b37d63847c 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 6ac6855b1bdf..2ff66b7ffaad 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" } } */
-- 
2.43.5

Reply via email to