[PATCH] tree-optimization/110935 - add testcase

Richard Biener <[email protected]>
Newsgroups gmane.comp.gcc.patches
Message-ID <[email protected]>
The issue in the bug was fixed for GCC 16, this adds a testcase.

Tested on x86_64-unknown-linux-gnu, pushed.

	PR tree-optimization/110935
	* gcc.dg/vect/bb-slp-reduc-pr110935.c: New testcase.
---
 gcc/testsuite/gcc.dg/vect/bb-slp-reduc-pr110935.c | 11 +++++++++++
 1 file changed, 11 insertions(+)
 create mode 100644 gcc/testsuite/gcc.dg/vect/bb-slp-reduc-pr110935.c

diff --git a/gcc/testsuite/gcc.dg/vect/bb-slp-reduc-pr110935.c b/gcc/testsuite/gcc.dg/vect/bb-slp-reduc-pr110935.c
new file mode 100644
index 00000000000..88243d40c05
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/bb-slp-reduc-pr110935.c
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+/* { dg-additional-options "-ffast-math" } */
+
+double vals[16];
+double test ()
+{
+  vals[0]++;
+  return vals[2] + vals[4] + vals[1] + vals[3];
+}
+
+/* { dg-final { scan-tree-dump "optimized: basic block part vectorized" "slp2" { target { vect_double && vect_hw_misalign } } } } */
-- 
2.51.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.