[gcc r17-3137] tree-optimization/110935 - add testcase

Richard Biener via Gcc-cvs <[email protected]>
Newsgroups gmane.comp.gcc.cvs
Message-ID <[email protected]>
https://gcc.gnu.org/g:1fb622222606c1ef960d3fff0b420bb8e7473cff

commit r17-3137-g1fb622222606c1ef960d3fff0b420bb8e7473cff
Author: Richard Biener <[email protected]>
Date:   Fri Aug 7 15:11:15 2026 +0200

    tree-optimization/110935 - add testcase
    
    The issue in the bug was fixed for GCC 16, this adds a testcase.
    
            PR tree-optimization/110935
            * gcc.dg/vect/bb-slp-reduc-pr110935.c: New testcase.

Diff:
---
 gcc/testsuite/gcc.dg/vect/bb-slp-reduc-pr110935.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

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 000000000000..88243d40c058
--- /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 } } } } */
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.