From: Tom de Vries <Tom_deVries@mentor.com>
To: Sebastian Pop <sebpop@gmail.com>,
Richard Biener <richard.guenther@gmail.com>
Cc: "gcc-patches@gnu.org" <gcc-patches@gnu.org>
Subject: Re: [PATCH] Don't allow unsafe reductions in graphite
Date: Sat, 25 Jul 2015 11:41:00 -0000 [thread overview]
Message-ID: <55B34467.4050707@mentor.com> (raw)
In-Reply-To: <20150724202007.GA17610@f1.c.bardezibar.internal>
[-- Attachment #1: Type: text/plain, Size: 612 bytes --]
On 24/07/15 22:20, Sebastian Pop wrote:
> Richard Biener wrote:
>> On Wed, Jul 22, 2015 at 6:00 PM, Tom de Vries <Tom_deVries@mentor.com> wrote:
>>> Currently bootstrapping and reg-testing on x86_64.
>>>
>>> OK for trunk?
>>>
>>> OK 5 and 4.9 release branches?
>>
>> Ok if Sebastian is fine with it.
>
> Ok to backport as well.
> Thanks Tom for the patches.
And thanks for the review.
This follow-up patch:
- makes sure that the uns-*.c variants are handled the same as the
original ones in graphite.exp.
- actually makes the uns-*.c variants use unsigned arithmetic.
Committed to trunk.
Thanks,
- Tom
[-- Attachment #2: 0001-Fixup-graphite-uns-.c-testcases.patch --]
[-- Type: text/x-patch, Size: 6017 bytes --]
Fixup graphite/uns-*.c testcases
2015-07-25 Tom de Vries <tom@codesourcery.com>
* gcc.dg/graphite/graphite.exp: Include uns-*.c files in
interchange_files and block_files variables.
* gcc.dg/graphite/uns-block-1.c (main): Change signed into unsigned
arithmetic.
* gcc.dg/graphite/uns-interchange-12.c: Same.
* gcc.dg/graphite/uns-interchange-14.c: Same.
* gcc.dg/graphite/uns-interchange-15.c: Same.
* gcc.dg/graphite/uns-interchange-9.c (foo): Same.
* gcc.dg/graphite/uns-interchange-mvt.c: Same.
---
gcc/testsuite/gcc.dg/graphite/graphite.exp | 6 ++++--
gcc/testsuite/gcc.dg/graphite/uns-block-1.c | 6 +++---
gcc/testsuite/gcc.dg/graphite/uns-interchange-12.c | 7 ++++---
gcc/testsuite/gcc.dg/graphite/uns-interchange-14.c | 5 +++--
gcc/testsuite/gcc.dg/graphite/uns-interchange-15.c | 7 ++++---
gcc/testsuite/gcc.dg/graphite/uns-interchange-9.c | 11 ++++++-----
gcc/testsuite/gcc.dg/graphite/uns-interchange-mvt.c | 7 ++++---
7 files changed, 28 insertions(+), 21 deletions(-)
diff --git a/gcc/testsuite/gcc.dg/graphite/graphite.exp b/gcc/testsuite/gcc.dg/graphite/graphite.exp
index 9dba5d6..9e7ede6 100644
--- a/gcc/testsuite/gcc.dg/graphite/graphite.exp
+++ b/gcc/testsuite/gcc.dg/graphite/graphite.exp
@@ -41,8 +41,10 @@ set wait_to_run_files [lsort [glob -nocomplain $srcdir/$subdir/*.c ] ]
set scop_files [lsort [glob -nocomplain $srcdir/$subdir/scop-*.c ] ]
set id_files [lsort [glob -nocomplain $srcdir/$subdir/id-*.c ] ]
set run_id_files [lsort [glob -nocomplain $srcdir/$subdir/run-id-*.c ] ]
-set interchange_files [lsort [glob -nocomplain $srcdir/$subdir/interchange-*.c ] ]
-set block_files [lsort [glob -nocomplain $srcdir/$subdir/block-*.c ] ]
+set interchange_files [lsort [glob -nocomplain $srcdir/$subdir/interchange-*.c \
+ $srcdir/$subdir/uns-interchange-*.c ] ]
+set block_files [lsort [glob -nocomplain $srcdir/$subdir/block-*.c \
+ $srcdir/$subdir/uns-block-*.c ] ]
set vect_files [lsort [glob -nocomplain $srcdir/$subdir/vect-*.c ] ]
# Tests to be compiled.
diff --git a/gcc/testsuite/gcc.dg/graphite/uns-block-1.c b/gcc/testsuite/gcc.dg/graphite/uns-block-1.c
index 57d522b..c50b770 100644
--- a/gcc/testsuite/gcc.dg/graphite/uns-block-1.c
+++ b/gcc/testsuite/gcc.dg/graphite/uns-block-1.c
@@ -13,9 +13,9 @@ int
main (void)
{
int i, j;
- int sum = 0;
- int A[MAX * MAX];
- int B[MAX * MAX];
+ unsigned int sum = 0;
+ unsigned int A[MAX * MAX];
+ unsigned int B[MAX * MAX];
/* These loops should be loop blocked. */
for (i = 0; i < MAX; i++)
diff --git a/gcc/testsuite/gcc.dg/graphite/uns-interchange-12.c b/gcc/testsuite/gcc.dg/graphite/uns-interchange-12.c
index dc26926..bd21ba9 100644
--- a/gcc/testsuite/gcc.dg/graphite/uns-interchange-12.c
+++ b/gcc/testsuite/gcc.dg/graphite/uns-interchange-12.c
@@ -7,9 +7,9 @@
#define N 200
-int A[N][N], B[N][N], C[N][N];
+unsigned int A[N][N], B[N][N], C[N][N];
-static int __attribute__((noinline))
+static unsigned int __attribute__((noinline))
matmult (void)
{
int i, j, k;
@@ -31,7 +31,8 @@ extern void abort ();
int
main (void)
{
- int i, j, res;
+ int i, j;
+ unsigned int res;
for (i = 0; i < N; i++)
for (j = 0; j < N; j++)
diff --git a/gcc/testsuite/gcc.dg/graphite/uns-interchange-14.c b/gcc/testsuite/gcc.dg/graphite/uns-interchange-14.c
index 36990ab..b1abd13 100644
--- a/gcc/testsuite/gcc.dg/graphite/uns-interchange-14.c
+++ b/gcc/testsuite/gcc.dg/graphite/uns-interchange-14.c
@@ -7,7 +7,7 @@
#define N 200
-int A[N][N], B[N][N], C[N][N];
+unsigned int A[N][N], B[N][N], C[N][N];
static void __attribute__((noinline))
matmult (void)
@@ -30,7 +30,8 @@ extern void abort ();
int
main (void)
{
- int i, j, res = 0;
+ int i, j;
+ unsigned res = 0;
for (i = 0; i < N; i++)
for (j = 0; j < N; j++)
diff --git a/gcc/testsuite/gcc.dg/graphite/uns-interchange-15.c b/gcc/testsuite/gcc.dg/graphite/uns-interchange-15.c
index 3ddb74f..a5a2e27 100644
--- a/gcc/testsuite/gcc.dg/graphite/uns-interchange-15.c
+++ b/gcc/testsuite/gcc.dg/graphite/uns-interchange-15.c
@@ -7,9 +7,9 @@
#define NMAX 2000
-static int x[NMAX], a[NMAX][NMAX];
+static unsigned int x[NMAX], a[NMAX][NMAX];
-static int __attribute__((noinline))
+static unsigned int __attribute__((noinline))
mvt (long N)
{
int i,j;
@@ -27,7 +27,8 @@ extern void abort ();
int
main (void)
{
- int i, j, res;
+ int i, j;
+ unsigned int res;
for (i = 0; i < NMAX; i++)
for (j = 0; j < NMAX; j++)
diff --git a/gcc/testsuite/gcc.dg/graphite/uns-interchange-9.c b/gcc/testsuite/gcc.dg/graphite/uns-interchange-9.c
index cfec110..6bfd3d6 100644
--- a/gcc/testsuite/gcc.dg/graphite/uns-interchange-9.c
+++ b/gcc/testsuite/gcc.dg/graphite/uns-interchange-9.c
@@ -8,11 +8,11 @@
#define N 111
#define M 111
-static int __attribute__((noinline))
-foo (int *x)
+static unsigned int __attribute__((noinline))
+foo (unsigned int *x)
{
int i, j;
- int sum = 0;
+ unsigned int sum = 0;
for (j = 0; j < M; ++j)
for (i = 0; i < N; ++i)
@@ -26,8 +26,9 @@ extern void abort ();
int
main (void)
{
- int A[N*M];
- int i, res;
+ unsigned int A[N*M];
+ int i;
+ unsigned int res;
for (i = 0; i < N*M; i++)
A[i] = 2;
diff --git a/gcc/testsuite/gcc.dg/graphite/uns-interchange-mvt.c b/gcc/testsuite/gcc.dg/graphite/uns-interchange-mvt.c
index 4b8f264..80f6789 100644
--- a/gcc/testsuite/gcc.dg/graphite/uns-interchange-mvt.c
+++ b/gcc/testsuite/gcc.dg/graphite/uns-interchange-mvt.c
@@ -7,9 +7,9 @@
#define NMAX 2000
-static int x1[NMAX], x2[NMAX], a[NMAX][NMAX], y1[NMAX], y2[NMAX];
+static unsigned int x1[NMAX], x2[NMAX], a[NMAX][NMAX], y1[NMAX], y2[NMAX];
-static int __attribute__((noinline))
+static unsigned int __attribute__((noinline))
mvt (long N)
{
@@ -32,7 +32,8 @@ extern void abort ();
int
main (void)
{
- int i, j, res;
+ int i, j;
+ unsigned int res;
for (i = 0; i < NMAX; i++)
for (j = 0; j < NMAX; j++)
--
1.9.1
next prev parent reply other threads:[~2015-07-25 8:10 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-15 22:18 [RFC, PR66873] Use graphite for parloops Tom de Vries
2015-07-16 8:48 ` Richard Biener
2015-07-16 10:25 ` Thomas Schwinge
2015-07-16 10:28 ` Richard Biener
2015-07-16 10:41 ` Richard Biener
2015-07-26 22:54 ` Tom de Vries
2015-07-27 5:41 ` Sebastian Pop
2015-07-16 11:41 ` Tom de Vries
2015-07-20 18:53 ` Sebastian Pop
2015-07-21 0:22 ` Tom de Vries
2015-07-20 18:54 ` Sebastian Pop
2015-07-21 5:59 ` Tom de Vries
2015-07-21 14:35 ` Tom de Vries
2015-07-21 19:08 ` Sebastian Pop
2015-07-22 11:02 ` Richard Biener
2015-07-22 11:18 ` Richard Biener
2015-07-22 16:04 ` [PATCH] Don't allow unsafe reductions in graphite Tom de Vries
2015-07-23 10:51 ` Richard Biener
2015-07-24 20:37 ` Sebastian Pop
2015-07-25 11:41 ` Tom de Vries [this message]
2015-07-22 16:38 ` [PATCH] Check TYPE_OVERFLOW_WRAPS for parloops reductions Tom de Vries
2015-07-23 10:54 ` Richard Biener
2015-07-24 10:43 ` [committed] Remove xfail in autopar/uns-outer-4.c Tom de Vries
2015-07-24 11:54 ` [PATCH] Add FIXED_POINT_TYPE_OVERFLOW_WRAPS_P Tom de Vries
2015-07-22 15:33 ` [PATCH] Document ftrapv/fwrapv interaction Tom de Vries
2015-07-23 10:39 ` Richard Biener
2015-07-23 10:42 ` Richard Biener
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=55B34467.4050707@mentor.com \
--to=tom_devries@mentor.com \
--cc=gcc-patches@gnu.org \
--cc=richard.guenther@gmail.com \
--cc=sebpop@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).