This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Add testcases from PR57186


The fix for PR59299 fixed two testcases referenced in PR57186.

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

Richard.

2014-06-10  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/57186
	PR tree-optimization/59299
	* gcc.dg/tree-ssa/ssa-sink-11.c: New testcase.
	* gcc.dg/tree-ssa/ssa-sink-12.c: Likewise.

Index: gcc/testsuite/gcc.dg/tree-ssa/ssa-sink-12.c
===================================================================
--- gcc/testsuite/gcc.dg/tree-ssa/ssa-sink-12.c	(revision 0)
+++ gcc/testsuite/gcc.dg/tree-ssa/ssa-sink-12.c	(working copy)
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-optimized" } */
+
+#define SIZE 64
+
+int foo (int v1[], int v2[])
+{
+  int r, i, j;
+
+  for (j = 0; j < SIZE; j++)
+    for (i = 0; i < SIZE; i++)
+      r = v1[j] + v2[i];
+
+  return r;
+}
+
+/* { dg-final { scan-tree-dump "MEM\\\[.* \\+ 252B\\\]" "optimized"} } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
Index: gcc/testsuite/gcc.dg/tree-ssa/ssa-sink-11.c
===================================================================
--- gcc/testsuite/gcc.dg/tree-ssa/ssa-sink-11.c	(revision 0)
+++ gcc/testsuite/gcc.dg/tree-ssa/ssa-sink-11.c	(working copy)
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-optimized" } */
+
+#define SIZE 64
+
+int foo (int v[], int a)
+{
+  int r, i;
+
+  for (i = 0; i < SIZE; i++)
+    r = v[i] + a;
+
+  return r;
+}
+
+/* { dg-final { scan-tree-dump "MEM\\\[.* \\+ 252B\\\]" "optimized"} } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]