* [committed] Add testcase for already fixed PR tree-optimization/87320
@ 2018-12-04 23:29 Jakub Jelinek
0 siblings, 0 replies; only message in thread
From: Jakub Jelinek @ 2018-12-04 23:29 UTC (permalink / raw)
To: gcc-patches
Hi!
I've committed the following testcase for already fixed PR, which has been
fixed by the PR87288 fix, after testing on x86_64-linux and i686-linux.
2018-12-04 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/87320
* gcc.dg/pr87320.c: New test.
--- gcc/testsuite/gcc.dg/pr87320.c.jj 2018-12-04 19:16:45.370455885 +0100
+++ gcc/testsuite/gcc.dg/pr87320.c 2018-12-04 19:16:38.428568535 +0100
@@ -0,0 +1,28 @@
+/* PR tree-optimization/87320 */
+/* { dg-do run } */
+/* { dg-options "-O3" } */
+/* { dg-additional-options "-mavx" { target avx_runtime } } */
+
+static void __attribute__ ((noinline))
+transpose_vector (unsigned long n)
+{
+ unsigned long data[2 * n];
+ for (unsigned long i = 0; i < 2 * n; i++)
+ data[i] = 4 * i + 2;
+
+ unsigned long transposed[n];
+ for (unsigned long i = 0; i < n; i++)
+ transposed[i] = data[2 * i];
+
+ for (unsigned long i = 0; i < n; i++)
+ if (transposed[i] != 8 * i + 2)
+ __builtin_abort ();
+}
+
+int
+main ()
+{
+ transpose_vector (4);
+ transpose_vector (120);
+ return 0;
+}
Jakub
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2018-12-04 23:29 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-04 23:29 [committed] Add testcase for already fixed PR tree-optimization/87320 Jakub Jelinek
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).