summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target
diff options
context:
space:
mode:
authorStefan Schulze Frielinghaus <stefansf@linux.ibm.com>2023-05-16 08:34:28 +0200
committerStefan Schulze Frielinghaus <stefansf@linux.ibm.com>2023-05-16 08:34:28 +0200
commitc4dbea65b2777735551727d56f59a26f8ce2de0a (patch)
tree4787df305a714b97b1f6a8e6434e1a22801ad198 /gcc/testsuite/gcc.target
parent5154171e1f3aa4aa120cee3ecf0347cd72a427fb (diff)
downloadgcc-c4dbea65b2777735551727d56f59a26f8ce2de0a.tar.gz
s390: Refactor block operation setmem
Vectorize memset with a constant length of less than or equal to 64 bytes. Do not perform a libc function call into memset in case the size is not a compile-time constant but bounded and the upper bound is less than or equal to 256 bytes. gcc/ChangeLog: * config/s390/s390-protos.h (s390_expand_setmem): Change function signature. * config/s390/s390.cc (s390_expand_setmem): For memset's less than or equal to 256 byte do not perform a libc call. * config/s390/s390.md: Change expander into a version which takes 8 operands. gcc/testsuite/ChangeLog: * gcc.target/s390/memset-1.c: Test case memset1 makes use of vst, now.
Diffstat (limited to 'gcc/testsuite/gcc.target')
-rw-r--r--gcc/testsuite/gcc.target/s390/memset-1.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/gcc/testsuite/gcc.target/s390/memset-1.c b/gcc/testsuite/gcc.target/s390/memset-1.c
index 9463a77208b..5eb96112f13 100644
--- a/gcc/testsuite/gcc.target/s390/memset-1.c
+++ b/gcc/testsuite/gcc.target/s390/memset-1.c
@@ -11,7 +11,7 @@ void
return __builtin_memset (s, c, 1);
}
-/* 1 stc 1 mvc */
+/* 3 vst */
void
*memset1(void *s, int c)
{
@@ -170,8 +170,9 @@ void
}
/* { dg-final { scan-assembler-times "mvi\\s" 1 } } */
-/* { dg-final { scan-assembler-times "mvc\\s" 20 } } */
+/* { dg-final { scan-assembler-times "mvc\\s" 19 } } */
/* { dg-final { scan-assembler-times "xc\\s" 28 } } */
-/* { dg-final { scan-assembler-times "stc\\s" 22 } } */
+/* { dg-final { scan-assembler-times "stc\\s" 21 } } */
/* { dg-final { scan-assembler-times "stcy\\s" 0 } } */
/* { dg-final { scan-assembler-times "pfd\\s" 2 } } */
+/* { dg-final { scan-assembler-times "vst\\s" 3 } } */