From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18899 invoked by alias); 12 Aug 2010 22:47:20 -0000 Received: (qmail 18881 invoked by uid 22791); 12 Aug 2010 22:47:18 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,TW_TM X-Spam-Check-By: sourceware.org Received: from tx2ehsobe003.messaging.microsoft.com (HELO TX2EHSOBE005.bigfish.com) (65.55.88.13) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 12 Aug 2010 22:47:13 +0000 Received: from mail165-tx2-R.bigfish.com (10.9.14.242) by TX2EHSOBE005.bigfish.com (10.9.40.25) with Microsoft SMTP Server id 8.1.340.0; Thu, 12 Aug 2010 22:47:10 +0000 Received: from mail165-tx2 (localhost.localdomain [127.0.0.1]) by mail165-tx2-R.bigfish.com (Postfix) with ESMTP id 3713F348392; Thu, 12 Aug 2010 22:47:10 +0000 (UTC) X-SpamScore: -22 X-BigFish: VPS-22(zz1432N936eM4015L9371Pzz1202hzzz32i2a8h61h) X-Spam-TCS-SCL: 0:0 Received: from mail165-tx2 (localhost.localdomain [127.0.0.1]) by mail165-tx2 (MessageSwitch) id 1281653229752689_6058; Thu, 12 Aug 2010 22:47:09 +0000 (UTC) Received: from TX2EHSMHS018.bigfish.com (unknown [10.9.14.243]) by mail165-tx2.bigfish.com (Postfix) with ESMTP id B4891B8004D; Thu, 12 Aug 2010 22:47:09 +0000 (UTC) Received: from ausb3extmailp02.amd.com (163.181.251.22) by TX2EHSMHS018.bigfish.com (10.9.99.118) with Microsoft SMTP Server (TLS) id 14.0.482.44; Thu, 12 Aug 2010 22:47:06 +0000 Received: from ausb3twp01.amd.com (ausb3twp01.amd.com [163.181.250.37]) by ausb3extmailp02.amd.com (Switch-3.2.7/Switch-3.2.7) with SMTP id o7CMiYRG009082; Thu, 12 Aug 2010 17:44:47 -0500 X-M-MSG: Received: from sausexhtp01.amd.com (sausexhtp01.amd.com [163.181.3.165]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) by ausb3twp01.amd.com (Tumbleweed MailGate 3.7.2) with ESMTP id 2FADA1028722; Thu, 12 Aug 2010 17:43:31 -0500 (CDT) Received: from SAUSEXMBP01.amd.com ([163.181.3.198]) by sausexhtp01.amd.com ([163.181.3.165]) with mapi; Thu, 12 Aug 2010 17:43:32 -0500 From: "Fang, Changpeng" To: Ira Rosen CC: "gcc-patches@gcc.gnu.org" Date: Thu, 12 Aug 2010 22:48:00 -0000 Subject: RE: [Patch PR 45241]: CPU2006 465.tonto ICE in the vectorizer with -fno-tree-pre Message-ID: References: , , In-Reply-To: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Reverse-DNS: ausb3extmailp02.amd.com Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2010-08/txt/msg00962.txt.bz2 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 wi= th -fno-tree-pre "Fang, Changpeng" 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" 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 =3D 0; i < x; i++) > + y =3D x * i; > + > + for (i =3D x; i > 0; i--) > + sum +=3D 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]