aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2020-02-26 10:58:13 +0100
committerJakub Jelinek <jakub@redhat.com>2020-02-26 10:58:13 +0100
commitce25177f505ea75b3c0833c3f3f0072b97ee1b44 (patch)
tree5d3c19b2ec601e31ecc0da660a9195b5c0ee4961
parent4d213bf6011ed2b30b9d0ca70069a5dbc294b5d7 (diff)
downloadgcc-ce25177f505ea75b3c0833c3f3f0072b97ee1b44.zip
gcc-ce25177f505ea75b3c0833c3f3f0072b97ee1b44.tar.gz
gcc-ce25177f505ea75b3c0833c3f3f0072b97ee1b44.tar.bz2
testsuite: Add a -O2 -fgimple testcase next to the -O2 -fno-tree-dse one [PR93820]
2020-02-26 Jakub Jelinek <jakub@redhat.com> PR tree-optimization/93820 * gcc.dg/pr93820-2.c: New test.
-rw-r--r--gcc/testsuite/ChangeLog3
-rw-r--r--gcc/testsuite/gcc.dg/pr93820-2.c30
2 files changed, 33 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 53a2a4c..35715ad 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,6 +1,9 @@
2020-02-26 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/93820
+ * gcc.dg/pr93820-2.c: New test.
+
+ PR tree-optimization/93820
* gcc.dg/pr93820.c: New test.
PR c++/93905
diff --git a/gcc/testsuite/gcc.dg/pr93820-2.c b/gcc/testsuite/gcc.dg/pr93820-2.c
new file mode 100644
index 0000000..be5d368
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr93820-2.c
@@ -0,0 +1,30 @@
+/* PR tree-optimization/93820 */
+/* { dg-do run } */
+/* { dg-options "-O2 -fgimple" } */
+
+typedef int v4si __attribute__((vector_size(4 * sizeof (int))));
+int a[10];
+
+void __GIMPLE (ssa,startwith("store-merging"))
+foo (int *p)
+{
+ int _2;
+ __BB(2):
+ _2 = *p_1(D);
+ a[6] = _2;
+ a[4] = 1;
+ __MEM <v4si> ((int *)&a + _Literal (int *) 16) = _Literal (v4si) { 0, 0, 0, 0 };
+ a[3] = 0;
+ return;
+}
+
+int
+main ()
+{
+ int i = 0;
+ foo (&i);
+ for (i = 0; i < 10; i++)
+ if (a[i])
+ __builtin_abort ();
+ return 0;
+}