aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/i386/reduc-pshuf.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.target/i386/reduc-pshuf.c')
-rw-r--r--gcc/testsuite/gcc.target/i386/reduc-pshuf.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/i386/reduc-pshuf.c b/gcc/testsuite/gcc.target/i386/reduc-pshuf.c
new file mode 100644
index 0000000..e46d2ba
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/reduc-pshuf.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+/* { dg-options "-O3 -march=znver5 " } */
+
+#define N 32
+#define T short
+T
+foo (T *a)
+{
+ T sum = 0;
+ for (int i = 0; i < N; i++)
+ sum += a[i];
+ return sum;
+}
+
+/* { dg-final { scan-assembler-times "vpsrl" 0 } } */
+/* { dg-final { scan-assembler-times "vpshuf" 3 } } */