Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(151)

Unified Diff: gcc/gcc/testsuite/gcc.dg/graphite/block-4.c

Issue 3050029: [gcc] GCC 4.5.0=>4.5.1 (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/nacl-toolchain.git
Patch Set: Created 10 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gcc/gcc/testsuite/gcc.dg/graphite/block-2.c ('k') | gcc/gcc/testsuite/gcc.dg/graphite/block-6.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gcc/gcc/testsuite/gcc.dg/graphite/block-4.c
diff --git a/gcc/gcc/testsuite/gcc.dg/graphite/block-4.c b/gcc/gcc/testsuite/gcc.dg/graphite/block-4.c
index e3649f01d2d0c40736f919fd25f6464601a1f4e0..ac22ec3aff29881643c859f05580ea9b016f17e0 100644
--- a/gcc/gcc/testsuite/gcc.dg/graphite/block-4.c
+++ b/gcc/gcc/testsuite/gcc.dg/graphite/block-4.c
@@ -1,11 +1,17 @@
-/* { dg-options "-O2 -floop-block -fdump-tree-graphite-all" } */
+/* { dg-require-effective-target size32plus } */
+
+#define DEBUG 0
+#if DEBUG
+#include <stdio.h>
+#endif
#define N 24
#define M 1000
-float A[1000][1000], B[1000][1000], C[1000][1000];
+int A[M][M], B[M][M], C[M][M];
-void test (void)
+static int __attribute__((noinline))
+foo (void)
{
int i, j, k;
@@ -14,10 +20,39 @@ void test (void)
for (k = 0; k < 24; k++)
A[i][j] = B[i][k] * C[k][j];
- for (i = 0; i < 1000; i++)
- for (j = 0; j < 1000; j++)
- for (k = 0; k < 1000; k++)
+ for (i = 0; i < M; i++)
+ for (j = 0; j < M; j++)
+ for (k = 0; k < M; k++)
A[i][j] = B[i][k] * C[k][j];
+
+ return A[0][0] + A[M-1][M-1];
+}
+
+extern void abort ();
+
+int
+main (void)
+{
+ int i, j, res;
+
+ for (i = 0; i < M; i++)
+ for (j = 0; j < M; j++)
+ {
+ B[i][j] = i;
+ C[i][j] = j;
+ }
+
+ res = foo ();
+
+#if DEBUG
+ fprintf (stderr, "res = %d \n", res);
+#endif
+
+ if (res != 998001)
+ abort ();
+
+ return 0;
}
+/* { dg-final { scan-tree-dump-times "will be loop blocked" 1 "graphite" { xfail *-*-* } } } */
/* { dg-final { cleanup-tree-dump "graphite" } } */
« no previous file with comments | « gcc/gcc/testsuite/gcc.dg/graphite/block-2.c ('k') | gcc/gcc/testsuite/gcc.dg/graphite/block-6.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698