diff mbox series

[committed] testsuite: Add 64-bit vector variant for bb-slp-pr95839.c

Message ID alpine.DEB.2.20.2307191141511.28892@tpp.orcam.me.uk
State New
Headers show
Series [committed] testsuite: Add 64-bit vector variant for bb-slp-pr95839.c | expand

Commit Message

Maciej W. Rozycki July 19, 2023, 11:02 a.m. UTC
Add dual-single float vector test complementing bb-slp-pr95839.c.

	gcc/testsuite/
	* gcc.dg/vect/bb-slp-pr95839-v8.c: New test.
---
Committed with Richard Biener's approval: 
<https://gcc.gnu.org/pipermail/gcc-patches/2023-July/624194.html>.
---
 gcc/testsuite/gcc.dg/vect/bb-slp-pr95839-v8.c |   13 +++++++++++++
 1 file changed, 13 insertions(+)

gcc-test-bb-slp-pr95839-v8.diff
diff mbox series

Patch

Index: gcc/gcc/testsuite/gcc.dg/vect/bb-slp-pr95839-v8.c
===================================================================
--- /dev/null
+++ gcc/gcc/testsuite/gcc.dg/vect/bb-slp-pr95839-v8.c
@@ -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" } } */