public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Ira Rosen <IRAR@il.ibm.com>
To: "Fang, Changpeng" <Changpeng.Fang@amd.com>
Cc: "gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>
Subject: RE: [Patch  PR 45241]:  CPU2006 465.tonto ICE in the vectorizer with -fno-tree-pre
Date: Thu, 12 Aug 2010 17:42:00 -0000	[thread overview]
Message-ID: <OFD24CAEE4.5D6B1D43-ONC225777D.00605FFB-C225777D.0061208E@il.ibm.com> (raw)
In-Reply-To: <D4C76825A6780047854A11E93CDE84D03F2850B4@SAUSEXMBP01.amd.com>



"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]

  reply	other threads:[~2010-08-12 17:41 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-11 18:03 Fang, Changpeng
2010-08-12  7:36 ` Ira Rosen
2010-08-12 17:18   ` Fang, Changpeng
2010-08-12 17:42     ` Ira Rosen [this message]
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

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=OFD24CAEE4.5D6B1D43-ONC225777D.00605FFB-C225777D.0061208E@il.ibm.com \
    --to=irar@il.ibm.com \
    --cc=Changpeng.Fang@amd.com \
    --cc=gcc-patches@gcc.gnu.org \
    /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).