public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [Patch  PR 45241]:  CPU2006 465.tonto ICE in the vectorizer with -fno-tree-pre
@ 2010-08-11 18:03 Fang, Changpeng
  2010-08-12  7:36 ` Ira Rosen
  0 siblings, 1 reply; 7+ messages in thread
From: Fang, Changpeng @ 2010-08-11 18:03 UTC (permalink / raw)
  To: Ira Rosen, gcc-patches

[-- Attachment #1: Type: text/plain, Size: 618 bytes --]

Hi,

Attached patch fixes bug 45241: CPU2006 465.tonto ICE in the vectorizer with -fno-tree-pre.

When the vectorizer tries to recognize the dot_prod pattern, it traces the statements chain
outside the loop. As a result, ICE occurs when it tries to access the stmt_vinfo for a stmt
outside the loop.

This patch stops the pattern searching when the statement is already outside the loop.
It passed bootstrapping in both the trunk and 4.5 branch.

The bug is 4.5/4.6 regression, and it prevents benchmarking for cpu2006 with no PRE.

Is it OK to commit to 4,5 branch (and 4.6 ?

Thanks,

Changpeng
 

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-pr45241-give-up-dot_prod-pattern-searching-if-stmt-i.patch --]
[-- Type: text/x-patch; name="0001-pr45241-give-up-dot_prod-pattern-searching-if-stmt-i.patch", Size: 1767 bytes --]

From c13c752b77704e04b8285fb667d6f01f95352136 Mon Sep 17 00:00:00 2001
From: Changpeng Fang <chfang@houghton.(none)>
Date: Tue, 10 Aug 2010 15:31:20 -0700
Subject: [PATCH] pr45241 give up dot_prod pattern searching if stmt is outside the loop

	* gcc/tree-vect-patterns.c (vect_recog_dot_prod_pattern): Give
	up dor_prod pattern searching if a stmt is outside the loop.

	* gcc.dg/vect/pr45241.c: New.
---
 gcc/testsuite/gcc.dg/vect/pr45241.c |   19 +++++++++++++++++++
 gcc/tree-vect-patterns.c            |    5 +++++
 2 files changed, 24 insertions(+), 0 deletions(-)
 create mode 100644 gcc/testsuite/gcc.dg/vect/pr45241.c

diff --git a/gcc/testsuite/gcc.dg/vect/pr45241.c b/gcc/testsuite/gcc.dg/vect/pr45241.c
new file mode 100644
index 0000000..c04cf04
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/pr45241.c
@@ -0,0 +1,19 @@
+/* PR tree-optimization/45241 */
+/* { dg-do compile } */
+/* { dg-options "-O3 -ftree-pre" } */
+
+int
+foo (short x)
+{
+  short i, y;
+  int sum;
+
+  for (i = 0; i < x; i++)
+    y = x * i;
+
+  for (i = x; i > 0; i--)
+    sum += y;
+
+  return sum;
+}
+
diff --git a/gcc/tree-vect-patterns.c b/gcc/tree-vect-patterns.c
index 19f0ae6..19df13f 100644
--- a/gcc/tree-vect-patterns.c
+++ b/gcc/tree-vect-patterns.c
@@ -255,6 +255,11 @@ vect_recog_dot_prod_pattern (gimple last_stmt, tree *type_in, tree *type_out)
 
   prod_type = half_type;
   stmt = SSA_NAME_DEF_STMT (oprnd0);
+
+  /* It could not be the dot_prod pattern if the stmt is outside the loop.  */
+  if (!flow_bb_inside_loop_p (loop, gimple_bb (stmt)))
+    return NULL;
+
   /* FORNOW.  Can continue analyzing the def-use chain when this stmt in a phi
      inside the loop (in case we are analyzing an outer-loop).  */
   if (!is_gimple_assign (stmt))
-- 
1.6.3.3


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Patch  PR 45241]:  CPU2006 465.tonto ICE in the vectorizer with -fno-tree-pre
  2010-08-11 18:03 [Patch PR 45241]: CPU2006 465.tonto ICE in the vectorizer with -fno-tree-pre Fang, Changpeng
@ 2010-08-12  7:36 ` Ira Rosen
  2010-08-12 17:18   ` Fang, Changpeng
  0 siblings, 1 reply; 7+ messages in thread
From: Ira Rosen @ 2010-08-12  7:36 UTC (permalink / raw)
  To: Fang, Changpeng; +Cc: gcc-patches



"Fang, Changpeng" <Changpeng.Fang@amd.com> wrote on 11/08/2010 08:36:42 PM:

> Hi,
>
> Attached patch fixes bug 45241: CPU2006 465.tonto ICE in the
> vectorizer with -fno-tree-pre.
>
> When the vectorizer tries to recognize the dot_prod pattern, it
> traces the statements chain
> outside the loop. As a result, ICE occurs when it tries to access
> the stmt_vinfo for a stmt
> outside the loop.
>
> This patch stops the pattern searching when the statement is already
> outside the loop.
> It passed bootstrapping in both the trunk and 4.5 branch.

On which target? What about regtesting?

>
> The bug is 4.5/4.6 regression, and it prevents benchmarking for
> cpu2006 with no PRE.
>
> Is it OK to commit to 4,5 branch (and 4.6 ?
>
> Thanks,
>
> Changpeng
>


	* gcc/tree-vect-patterns.c (vect_recog_dot_prod_pattern): Give

No need in gcc/ before tree-vect-patterns.c.

	up dor_prod pattern searching if a stmt is outside the loop.

dot prod

	* gcc.dg/vect/pr45241.c: New.
---
 gcc/testsuite/gcc.dg/vect/pr45241.c |   19 +++++++++++++++++++
 gcc/tree-vect-patterns.c            |    5 +++++
 2 files changed, 24 insertions(+), 0 deletions(-)
 create mode 100644 gcc/testsuite/gcc.dg/vect/pr45241.c

diff --git a/gcc/testsuite/gcc.dg/vect/pr45241.c
b/gcc/testsuite/gcc.dg/vect/pr45241.c
new file mode 100644
index 0000000..c04cf04
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/pr45241.c
@@ -0,0 +1,19 @@
+/* PR tree-optimization/45241 */
+/* { dg-do compile } */
+/* { dg-options "-O3 -ftree-pre" } */

Instead of using dg-options please change the name of the test to
no-tree-pre-pr45241.c.

+
+int
+foo (short x)
+{
+  short i, y;
+  int sum;
+
+  for (i = 0; i < x; i++)
+    y = x * i;
+
+  for (i = x; i > 0; i--)
+    sum += y;
+
+  return sum;
+}
+

Please add

/* { dg-final { cleanup-tree-dump "vect" } } */

to the test.

Thanks,
Ira

^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: [Patch  PR 45241]:  CPU2006 465.tonto ICE in the vectorizer with -fno-tree-pre
  2010-08-12  7:36 ` Ira Rosen
@ 2010-08-12 17:18   ` Fang, Changpeng
  2010-08-12 17:42     ` Ira Rosen
  0 siblings, 1 reply; 7+ messages in thread
From: Fang, Changpeng @ 2010-08-12 17:18 UTC (permalink / raw)
  To: Ira Rosen; +Cc: gcc-patches

[-- Attachment #1: Type: text/plain, Size: 2512 bytes --]

Hi, Ira:

Thanks for your reviews. Attached is the updated patch.
It passed bootstrapping  on x86_64-unknown-linux-gnu and
the gcc regression tests (fixed PR 45241).

Since bug 45241 is a [4.5/4.6] regression, is it ok to 
commit to 4.5 branch and 4.6 trunk?

Thanks,

Changpeng


________________________________________
From: Ira Rosen [IRAR@il.ibm.com]
Sent: Thursday, August 12, 2010 1:13 AM
To: Fang, Changpeng
Cc: gcc-patches@gcc.gnu.org
Subject: Re: [Patch  PR 45241]:  CPU2006 465.tonto ICE in the vectorizer with -fno-tree-pre

"Fang, Changpeng" <Changpeng.Fang@amd.com> wrote on 11/08/2010 08:36:42 PM:

> Hi,
>
> Attached patch fixes bug 45241: CPU2006 465.tonto ICE in the
> vectorizer with -fno-tree-pre.
>
> When the vectorizer tries to recognize the dot_prod pattern, it
> traces the statements chain
> outside the loop. As a result, ICE occurs when it tries to access
> the stmt_vinfo for a stmt
> outside the loop.
>
> This patch stops the pattern searching when the statement is already
> outside the loop.
> It passed bootstrapping in both the trunk and 4.5 branch.

On which target? What about regtesting?

>
> The bug is 4.5/4.6 regression, and it prevents benchmarking for
> cpu2006 with no PRE.
>
> Is it OK to commit to 4,5 branch (and 4.6 ?
>
> Thanks,
>
> Changpeng
>


        * gcc/tree-vect-patterns.c (vect_recog_dot_prod_pattern): Give

No need in gcc/ before tree-vect-patterns.c.

        up dor_prod pattern searching if a stmt is outside the loop.

dot prod

        * gcc.dg/vect/pr45241.c: New.
---
 gcc/testsuite/gcc.dg/vect/pr45241.c |   19 +++++++++++++++++++
 gcc/tree-vect-patterns.c            |    5 +++++
 2 files changed, 24 insertions(+), 0 deletions(-)
 create mode 100644 gcc/testsuite/gcc.dg/vect/pr45241.c

diff --git a/gcc/testsuite/gcc.dg/vect/pr45241.c
b/gcc/testsuite/gcc.dg/vect/pr45241.c
new file mode 100644
index 0000000..c04cf04
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/pr45241.c
@@ -0,0 +1,19 @@
+/* PR tree-optimization/45241 */
+/* { dg-do compile } */
+/* { dg-options "-O3 -ftree-pre" } */

Instead of using dg-options please change the name of the test to
no-tree-pre-pr45241.c.

+
+int
+foo (short x)
+{
+  short i, y;
+  int sum;
+
+  for (i = 0; i < x; i++)
+    y = x * i;
+
+  for (i = x; i > 0; i--)
+    sum += y;
+
+  return sum;
+}
+

Please add

/* { dg-final { cleanup-tree-dump "vect" } } */

to the test.

Thanks,
Ira



[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-pr45241-give-up-dot_prod-pattern-searching-if-stmt-i.patch --]
[-- Type: text/x-patch; name="0001-pr45241-give-up-dot_prod-pattern-searching-if-stmt-i.patch", Size: 1901 bytes --]

From 075b88a514233e5c0ff877ddb27e756641b330d1 Mon Sep 17 00:00:00 2001
From: Changpeng Fang <chfang@houghton.(none)>
Date: Thu, 12 Aug 2010 10:08:54 -0700
Subject: [PATCH] pr45241 give up dot_prod pattern searching if stmt is outside the loop.

	* tree-vect-patterns.c (vect_recog_dot_prod_pattern): Give
	up dot_prod pattern searching if a stmt is outside the loop.

	* gcc.dg/vect/no-tree-pre-pr45241.c: New.
---
 gcc/testsuite/gcc.dg/vect/no-tree-pre-pr45241.c |   20 ++++++++++++++++++++
 gcc/tree-vect-patterns.c                        |    5 +++++
 2 files changed, 25 insertions(+), 0 deletions(-)
 create mode 100644 gcc/testsuite/gcc.dg/vect/no-tree-pre-pr45241.c

diff --git a/gcc/testsuite/gcc.dg/vect/no-tree-pre-pr45241.c b/gcc/testsuite/gcc.dg/vect/no-tree-pre-pr45241.c
new file mode 100644
index 0000000..7a4ad9d
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/no-tree-pre-pr45241.c
@@ -0,0 +1,20 @@
+/* PR tree-optimization/45241 */
+/* { dg-do compile } */
+/* { dg-options "-O3 -fno-tree-pre" } */
+
+int
+foo (short x)
+{
+  short i, y;
+  int sum;
+
+  for (i = 0; i < x; i++)
+    y = x * i;
+
+  for (i = x; i > 0; i--)
+    sum += y;
+
+  return sum;
+}
+
+/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/tree-vect-patterns.c b/gcc/tree-vect-patterns.c
index 19f0ae6..19df13f 100644
--- a/gcc/tree-vect-patterns.c
+++ b/gcc/tree-vect-patterns.c
@@ -255,6 +255,11 @@ vect_recog_dot_prod_pattern (gimple last_stmt, tree *type_in, tree *type_out)
 
   prod_type = half_type;
   stmt = SSA_NAME_DEF_STMT (oprnd0);
+
+  /* It could not be the dot_prod pattern if the stmt is outside the loop.  */
+  if (!flow_bb_inside_loop_p (loop, gimple_bb (stmt)))
+    return NULL;
+
   /* FORNOW.  Can continue analyzing the def-use chain when this stmt in a phi
      inside the loop (in case we are analyzing an outer-loop).  */
   if (!is_gimple_assign (stmt))
-- 
1.6.3.3


^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: [Patch  PR 45241]:  CPU2006 465.tonto ICE in the vectorizer with -fno-tree-pre
  2010-08-12 17:18   ` Fang, Changpeng
@ 2010-08-12 17:42     ` Ira Rosen
  2010-08-12 22:48       ` Fang, Changpeng
       [not found]       ` <D4C76825A6780047854A11E93CDE84D03F2850B7@SAUSEXMBP01.amd.com>
  0 siblings, 2 replies; 7+ messages in thread
From: Ira Rosen @ 2010-08-12 17:42 UTC (permalink / raw)
  To: Fang, Changpeng; +Cc: gcc-patches



"Fang, Changpeng" <Changpeng.Fang@amd.com> wrote on 12/08/2010 08:12:02 PM:

> Hi, Ira:
>
> Thanks for your reviews. Attached is the updated patch.
> It passed bootstrapping  on x86_64-unknown-linux-gnu and
> the gcc regression tests (fixed PR 45241).
>
> Since bug 45241 is a [4.5/4.6] regression, is it ok to
> commit to 4.5 branch and 4.6 trunk?


--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/no-tree-pre-pr45241.c
@@ -0,0 +1,20 @@
+/* PR tree-optimization/45241 */
+/* { dg-do compile } */
+/* { dg-options "-O3 -fno-tree-pre" } */

This line is redundant. vect.exp applies -fno-tree-pre to tests named
no-tree-pre-*. And there is no need in -O3, the default -O2
-ftree-vectorize are enough.

OK for trunk with this fix.

Thanks,
Ira


>
> Thanks,
>
> Changpeng
>
>
> ________________________________________
> From: Ira Rosen [IRAR@il.ibm.com]
> Sent: Thursday, August 12, 2010 1:13 AM
> To: Fang, Changpeng
> Cc: gcc-patches@gcc.gnu.org
> Subject: Re: [Patch  PR 45241]:  CPU2006 465.tonto ICE in the
> vectorizer with -fno-tree-pre
>
> "Fang, Changpeng" <Changpeng.Fang@amd.com> wrote on 11/08/2010 08:36:42
PM:
>
> > Hi,
> >
> > Attached patch fixes bug 45241: CPU2006 465.tonto ICE in the
> > vectorizer with -fno-tree-pre.
> >
> > When the vectorizer tries to recognize the dot_prod pattern, it
> > traces the statements chain
> > outside the loop. As a result, ICE occurs when it tries to access
> > the stmt_vinfo for a stmt
> > outside the loop.
> >
> > This patch stops the pattern searching when the statement is already
> > outside the loop.
> > It passed bootstrapping in both the trunk and 4.5 branch.
>
> On which target? What about regtesting?
>
> >
> > The bug is 4.5/4.6 regression, and it prevents benchmarking for
> > cpu2006 with no PRE.
> >
> > Is it OK to commit to 4,5 branch (and 4.6 ?
> >
> > Thanks,
> >
> > Changpeng
> >
>
>
>         * gcc/tree-vect-patterns.c (vect_recog_dot_prod_pattern): Give
>
> No need in gcc/ before tree-vect-patterns.c.
>
>         up dor_prod pattern searching if a stmt is outside the loop.
>
> dot prod
>
>         * gcc.dg/vect/pr45241.c: New.
> ---
>  gcc/testsuite/gcc.dg/vect/pr45241.c |   19 +++++++++++++++++++
>  gcc/tree-vect-patterns.c            |    5 +++++
>  2 files changed, 24 insertions(+), 0 deletions(-)
>  create mode 100644 gcc/testsuite/gcc.dg/vect/pr45241.c
>
> diff --git a/gcc/testsuite/gcc.dg/vect/pr45241.c
> b/gcc/testsuite/gcc.dg/vect/pr45241.c
> new file mode 100644
> index 0000000..c04cf04
> --- /dev/null
> +++ b/gcc/testsuite/gcc.dg/vect/pr45241.c
> @@ -0,0 +1,19 @@
> +/* PR tree-optimization/45241 */
> +/* { dg-do compile } */
> +/* { dg-options "-O3 -ftree-pre" } */
>
> Instead of using dg-options please change the name of the test to
> no-tree-pre-pr45241.c.
>
> +
> +int
> +foo (short x)
> +{
> +  short i, y;
> +  int sum;
> +
> +  for (i = 0; i < x; i++)
> +    y = x * i;
> +
> +  for (i = x; i > 0; i--)
> +    sum += y;
> +
> +  return sum;
> +}
> +
>
> Please add
>
> /* { dg-final { cleanup-tree-dump "vect" } } */
>
> to the test.
>
> Thanks,
> Ira
>
>
> [attachment "0001-pr45241-give-up-dot_prod-pattern-searching-if-
> stmt-i.patch" deleted by Ira Rosen/Haifa/IBM]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: [Patch  PR 45241]:  CPU2006 465.tonto ICE in the vectorizer with -fno-tree-pre
  2010-08-12 17:42     ` Ira Rosen
@ 2010-08-12 22:48       ` Fang, Changpeng
  2010-10-26 10:58         ` H.J. Lu
       [not found]       ` <D4C76825A6780047854A11E93CDE84D03F2850B7@SAUSEXMBP01.amd.com>
  1 sibling, 1 reply; 7+ messages in thread
From: Fang, Changpeng @ 2010-08-12 22:48 UTC (permalink / raw)
  To: Ira Rosen; +Cc: gcc-patches

Thanks.

For the trunk, it is committed as r163207:
http://gcc.gnu.org/ml/gcc-cvs/2010-08/msg00418.html

Still waiting for review for 4.5 branch!

Thanks,

Changpeng



________________________________________
From: Ira Rosen [IRAR@il.ibm.com]
Sent: Thursday, August 12, 2010 12:40 PM
To: Fang, Changpeng
Cc: gcc-patches@gcc.gnu.org
Subject: RE: [Patch  PR 45241]:  CPU2006 465.tonto ICE in the vectorizer with -fno-tree-pre

"Fang, Changpeng" <Changpeng.Fang@amd.com> wrote on 12/08/2010 08:12:02 PM:

> Hi, Ira:
>
> Thanks for your reviews. Attached is the updated patch.
> It passed bootstrapping  on x86_64-unknown-linux-gnu and
> the gcc regression tests (fixed PR 45241).
>
> Since bug 45241 is a [4.5/4.6] regression, is it ok to
> commit to 4.5 branch and 4.6 trunk?


--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/no-tree-pre-pr45241.c
@@ -0,0 +1,20 @@
+/* PR tree-optimization/45241 */
+/* { dg-do compile } */
+/* { dg-options "-O3 -fno-tree-pre" } */

This line is redundant. vect.exp applies -fno-tree-pre to tests named
no-tree-pre-*. And there is no need in -O3, the default -O2
-ftree-vectorize are enough.

OK for trunk with this fix.

Thanks,
Ira


>
> Thanks,
>
> Changpeng
>
>
> ________________________________________
> From: Ira Rosen [IRAR@il.ibm.com]
> Sent: Thursday, August 12, 2010 1:13 AM
> To: Fang, Changpeng
> Cc: gcc-patches@gcc.gnu.org
> Subject: Re: [Patch  PR 45241]:  CPU2006 465.tonto ICE in the
> vectorizer with -fno-tree-pre
>
> "Fang, Changpeng" <Changpeng.Fang@amd.com> wrote on 11/08/2010 08:36:42
PM:
>
> > Hi,
> >
> > Attached patch fixes bug 45241: CPU2006 465.tonto ICE in the
> > vectorizer with -fno-tree-pre.
> >
> > When the vectorizer tries to recognize the dot_prod pattern, it
> > traces the statements chain
> > outside the loop. As a result, ICE occurs when it tries to access
> > the stmt_vinfo for a stmt
> > outside the loop.
> >
> > This patch stops the pattern searching when the statement is already
> > outside the loop.
> > It passed bootstrapping in both the trunk and 4.5 branch.
>
> On which target? What about regtesting?
>
> >
> > The bug is 4.5/4.6 regression, and it prevents benchmarking for
> > cpu2006 with no PRE.
> >
> > Is it OK to commit to 4,5 branch (and 4.6 ?
> >
> > Thanks,
> >
> > Changpeng
> >
>
>
>         * gcc/tree-vect-patterns.c (vect_recog_dot_prod_pattern): Give
>
> No need in gcc/ before tree-vect-patterns.c.
>
>         up dor_prod pattern searching if a stmt is outside the loop.
>
> dot prod
>
>         * gcc.dg/vect/pr45241.c: New.
> ---
>  gcc/testsuite/gcc.dg/vect/pr45241.c |   19 +++++++++++++++++++
>  gcc/tree-vect-patterns.c            |    5 +++++
>  2 files changed, 24 insertions(+), 0 deletions(-)
>  create mode 100644 gcc/testsuite/gcc.dg/vect/pr45241.c
>
> diff --git a/gcc/testsuite/gcc.dg/vect/pr45241.c
> b/gcc/testsuite/gcc.dg/vect/pr45241.c
> new file mode 100644
> index 0000000..c04cf04
> --- /dev/null
> +++ b/gcc/testsuite/gcc.dg/vect/pr45241.c
> @@ -0,0 +1,19 @@
> +/* PR tree-optimization/45241 */
> +/* { dg-do compile } */
> +/* { dg-options "-O3 -ftree-pre" } */
>
> Instead of using dg-options please change the name of the test to
> no-tree-pre-pr45241.c.
>
> +
> +int
> +foo (short x)
> +{
> +  short i, y;
> +  int sum;
> +
> +  for (i = 0; i < x; i++)
> +    y = x * i;
> +
> +  for (i = x; i > 0; i--)
> +    sum += y;
> +
> +  return sum;
> +}
> +
>
> Please add
>
> /* { dg-final { cleanup-tree-dump "vect" } } */
>
> to the test.
>
> Thanks,
> Ira
>
>
> [attachment "0001-pr45241-give-up-dot_prod-pattern-searching-if-
> stmt-i.patch" deleted by Ira Rosen/Haifa/IBM]



^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: [Patch  PR 45241]:  CPU2006 465.tonto ICE in the vectorizer with -fno-tree-pre
       [not found]         ` <alpine.LNX.2.00.1008141409090.25856@zhemvz.fhfr.qr>
@ 2010-08-30 16:38           ` Fang, Changpeng
  0 siblings, 0 replies; 7+ messages in thread
From: Fang, Changpeng @ 2010-08-30 16:38 UTC (permalink / raw)
  To: Richard Guenther; +Cc: gcc-patches

Bootstrapped and tested in 4.5 branch on x86_64-unknown-linux. 
And committed to 4.5 branch as revision 163286.

Thanks,

Changpeng


________________________________________
From: Richard Guenther [rguenther@suse.de]
Sent: Saturday, August 14, 2010 7:09 AM
To: Fang, Changpeng
Subject: RE: [Patch  PR 45241]:  CPU2006 465.tonto ICE in the vectorizer with -fno-tree-pre

On Fri, 13 Aug 2010, Fang, Changpeng wrote:

> Hi, Richard:
>
> Is this patch OK to be committed to 4.5 branch for 4.5.2 release?

Yes, it's ok if you bootstrapped and tested it there.

Richard.

> Thanks,
>
> Changpeng
>
> ________________________________________
> From: Ira Rosen [IRAR@il.ibm.com]
> Sent: Thursday, August 12, 2010 12:40 PM
> To: Fang, Changpeng
> Cc: gcc-patches@gcc.gnu.org
> Subject: RE: [Patch  PR 45241]:  CPU2006 465.tonto ICE in the vectorizer with -fno-tree-pre
>
> "Fang, Changpeng" <Changpeng.Fang@amd.com> wrote on 12/08/2010 08:12:02 PM:
>
> > Hi, Ira:
> >
> > Thanks for your reviews. Attached is the updated patch.
> > It passed bootstrapping  on x86_64-unknown-linux-gnu and
> > the gcc regression tests (fixed PR 45241).
> >
> > Since bug 45241 is a [4.5/4.6] regression, is it ok to
> > commit to 4.5 branch and 4.6 trunk?
>
>
> --- /dev/null
> +++ b/gcc/testsuite/gcc.dg/vect/no-tree-pre-pr45241.c
> @@ -0,0 +1,20 @@
> +/* PR tree-optimization/45241 */
> +/* { dg-do compile } */
> +/* { dg-options "-O3 -fno-tree-pre" } */
>
> This line is redundant. vect.exp applies -fno-tree-pre to tests named
> no-tree-pre-*. And there is no need in -O3, the default -O2
> -ftree-vectorize are enough.
>
> OK for trunk with this fix.
>
> Thanks,
> Ira
>
>
> >
> > Thanks,
> >
> > Changpeng
> >
> >
> > ________________________________________
> > From: Ira Rosen [IRAR@il.ibm.com]
> > Sent: Thursday, August 12, 2010 1:13 AM
> > To: Fang, Changpeng
> > Cc: gcc-patches@gcc.gnu.org
> > Subject: Re: [Patch  PR 45241]:  CPU2006 465.tonto ICE in the
> > vectorizer with -fno-tree-pre
> >
> > "Fang, Changpeng" <Changpeng.Fang@amd.com> wrote on 11/08/2010 08:36:42
> PM:
> >
> > > Hi,
> > >
> > > Attached patch fixes bug 45241: CPU2006 465.tonto ICE in the
> > > vectorizer with -fno-tree-pre.
> > >
> > > When the vectorizer tries to recognize the dot_prod pattern, it
> > > traces the statements chain
> > > outside the loop. As a result, ICE occurs when it tries to access
> > > the stmt_vinfo for a stmt
> > > outside the loop.
> > >
> > > This patch stops the pattern searching when the statement is already
> > > outside the loop.
> > > It passed bootstrapping in both the trunk and 4.5 branch.
> >
> > On which target? What about regtesting?
> >
> > >
> > > The bug is 4.5/4.6 regression, and it prevents benchmarking for
> > > cpu2006 with no PRE.
> > >
> > > Is it OK to commit to 4,5 branch (and 4.6 ?
> > >
> > > Thanks,
> > >
> > > Changpeng
> > >
> >
> >
> >         * gcc/tree-vect-patterns.c (vect_recog_dot_prod_pattern): Give
> >
> > No need in gcc/ before tree-vect-patterns.c.
> >
> >         up dor_prod pattern searching if a stmt is outside the loop.
> >
> > dot prod
> >
> >         * gcc.dg/vect/pr45241.c: New.
> > ---
> >  gcc/testsuite/gcc.dg/vect/pr45241.c |   19 +++++++++++++++++++
> >  gcc/tree-vect-patterns.c            |    5 +++++
> >  2 files changed, 24 insertions(+), 0 deletions(-)
> >  create mode 100644 gcc/testsuite/gcc.dg/vect/pr45241.c
> >
> > diff --git a/gcc/testsuite/gcc.dg/vect/pr45241.c
> > b/gcc/testsuite/gcc.dg/vect/pr45241.c
> > new file mode 100644
> > index 0000000..c04cf04
> > --- /dev/null
> > +++ b/gcc/testsuite/gcc.dg/vect/pr45241.c
> > @@ -0,0 +1,19 @@
> > +/* PR tree-optimization/45241 */
> > +/* { dg-do compile } */
> > +/* { dg-options "-O3 -ftree-pre" } */
> >
> > Instead of using dg-options please change the name of the test to
> > no-tree-pre-pr45241.c.
> >
> > +
> > +int
> > +foo (short x)
> > +{
> > +  short i, y;
> > +  int sum;
> > +
> > +  for (i = 0; i < x; i++)
> > +    y = x * i;
> > +
> > +  for (i = x; i > 0; i--)
> > +    sum += y;
> > +
> > +  return sum;
> > +}
> > +
> >
> > Please add
> >
> > /* { dg-final { cleanup-tree-dump "vect" } } */
> >
> > to the test.
> >
> > Thanks,
> > Ira
> >
> >
> > [attachment "0001-pr45241-give-up-dot_prod-pattern-searching-if-
> > stmt-i.patch" deleted by Ira Rosen/Haifa/IBM]
>
>
>
>

--
Richard Guenther <rguenther@suse.de>
Novell / SUSE Labs
SUSE LINUX Products GmbH - Nuernberg - AG Nuernberg - HRB 16746 - GF: Markus Rex


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Patch PR 45241]: CPU2006 465.tonto ICE in the vectorizer with -fno-tree-pre
  2010-08-12 22:48       ` Fang, Changpeng
@ 2010-10-26 10:58         ` H.J. Lu
  0 siblings, 0 replies; 7+ messages in thread
From: H.J. Lu @ 2010-10-26 10:58 UTC (permalink / raw)
  To: Fang, Changpeng; +Cc: Ira Rosen, gcc-patches

On Thu, Aug 12, 2010 at 3:41 PM, Fang, Changpeng <Changpeng.Fang@amd.com> wrote:
> Thanks.
>
> For the trunk, it is committed as r163207:
> http://gcc.gnu.org/ml/gcc-cvs/2010-08/msg00418.html
>

This caused:

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46167


H.J.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2010-10-26  8:27 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-11 18:03 [Patch PR 45241]: CPU2006 465.tonto ICE in the vectorizer with -fno-tree-pre Fang, Changpeng
2010-08-12  7:36 ` Ira Rosen
2010-08-12 17:18   ` Fang, Changpeng
2010-08-12 17:42     ` Ira Rosen
2010-08-12 22:48       ` Fang, Changpeng
2010-10-26 10:58         ` H.J. Lu
     [not found]       ` <D4C76825A6780047854A11E93CDE84D03F2850B7@SAUSEXMBP01.amd.com>
     [not found]         ` <alpine.LNX.2.00.1008141409090.25856@zhemvz.fhfr.qr>
2010-08-30 16:38           ` Fang, Changpeng

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).