]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
testsuite: Add 64-bit vector variant for bb-slp-pr95839.c
authorMaciej W. Rozycki <macro@embecosm.com>
Wed, 19 Jul 2023 10:59:29 +0000 (11:59 +0100)
committerMaciej W. Rozycki <macro@embecosm.com>
Wed, 19 Jul 2023 10:59:29 +0000 (11:59 +0100)
Add dual-single float vector test complementing bb-slp-pr95839.c.

gcc/testsuite/
* gcc.dg/vect/bb-slp-pr95839-v8.c: New test.

gcc/testsuite/gcc.dg/vect/bb-slp-pr95839-v8.c [new file with mode: 0644]

diff --git a/gcc/testsuite/gcc.dg/vect/bb-slp-pr95839-v8.c b/gcc/testsuite/gcc.dg/vect/bb-slp-pr95839-v8.c
new file mode 100644 (file)
index 0000000..9a02107
--- /dev/null
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target vect_float } */
+/* { dg-additional-options "-w -Wno-psabi" } */
+
+typedef float __attribute__((vector_size(8))) v2f32;
+
+v2f32 f(v2f32 a, v2f32 b)
+{
+  /* Check that we vectorize this CTOR without any loads.  */
+  return (v2f32){a[0] + b[0], a[1] + b[1]};
+}
+
+/* { dg-final { scan-tree-dump "optimized: basic block" "slp2" } } */