public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r11-2949] tree-optimization/96854 - testcase for SLP reduction of two-operator
@ 2020-08-31 11:43 Richard Biener
0 siblings, 0 replies; only message in thread
From: Richard Biener @ 2020-08-31 11:43 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:f089569851ca9c8a81400dd8a159f86636ed20ec
commit r11-2949-gf089569851ca9c8a81400dd8a159f86636ed20ec
Author: Richard Biener <rguenther@suse.de>
Date: Mon Aug 31 13:36:09 2020 +0200
tree-optimization/96854 - testcase for SLP reduction of two-operator
This adds the testcase for the already fixed PR.
2020-08-31 Richard Biener <rguenther@suse.de>
PR tree-optimization/96854
* gcc.dg/vect/pr96854.c: New testcase.
Diff:
---
gcc/testsuite/gcc.dg/vect/pr96854.c | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/gcc/testsuite/gcc.dg/vect/pr96854.c b/gcc/testsuite/gcc.dg/vect/pr96854.c
new file mode 100644
index 00000000000..e3980d41303
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/pr96854.c
@@ -0,0 +1,20 @@
+/* { dg-additional-options "-ffast-math" } */
+
+double _Complex __attribute__((noipa))
+foo (double _Complex acc, const double _Complex *x, const double _Complex* y, int N)
+{
+ for (int c = 0; c < N; ++c)
+ acc -= x[c] * y[c];
+ return acc;
+}
+
+int
+main()
+{
+ static const double _Complex y[] = { 1, 2, };
+ static const double _Complex x[] = { 1, 3, };
+ double _Complex ref = foo (0, x, y, 2);
+ if (__builtin_creal (ref) != -7.)
+ __builtin_abort ();
+ return 0;
+}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-08-31 11:43 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-31 11:43 [gcc r11-2949] tree-optimization/96854 - testcase for SLP reduction of two-operator Richard Biener
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).