From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17251 invoked by alias); 18 Jul 2011 17:50:42 -0000 Received: (qmail 17240 invoked by uid 22791); 18 Jul 2011 17:50:42 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from service87.mimecast.com (HELO service87.mimecast.com) (94.185.240.25) by sourceware.org (qpsmtpd/0.43rc1) with SMTP; Mon, 18 Jul 2011 17:50:27 +0000 Received: from cam-owa1.Emea.Arm.com (fw-tnat.cambridge.arm.com [217.140.96.21]) by service87.mimecast.com; Mon, 18 Jul 2011 18:50:22 +0100 Received: from [10.1.67.34] ([10.1.255.212]) by cam-owa1.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.0); Mon, 18 Jul 2011 18:50:21 +0100 Message-ID: <4E24725C.4070804@arm.com> Date: Mon, 18 Jul 2011 18:40:00 -0000 From: Richard Earnshaw User-Agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-GB; rv:1.9.2.18) Gecko/20110616 Lightning/1.0b2 Thunderbird/3.1.11 MIME-Version: 1.0 To: Chung-Lin Tang CC: gcc-patches Subject: Re: [PATCH] Canonicalize compares in combine [3/3] ARM backend part References: <4E2430BA.6000906@codesourcery.com> In-Reply-To: <4E2430BA.6000906@codesourcery.com> X-MC-Unique: 111071818502202201 Content-Type: text/plain; charset=WINDOWS-1252 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes 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: 2011-07/txt/msg01431.txt.bz2 On 18/07/11 14:10, Chung-Lin Tang wrote: > On 2011/7/18 04:46 PM, Richard Earnshaw wrote: >> The patch to arm.c is ok, but the change to the test is not as it will c= ause problems with multilib testing. A better fix is to skip the test if t= he target is thumb1. >> >> The other test needs a similar check as it seems to expect a movs instru= ction. >> >> R. >=20 > Yes it seems more logical to skip for thumb1, at least for the movs one. > For the uxtb test, I think probably using "dg-require-effective-target > arm_thumb2_ok" would be more suitable wrt multilib testing. >=20 > Updated patch for the testcase parts, is this okay? >=20 > Thanks, > Chung-Lin >=20 OK. R. >=20 > testcase.diff >=20 >=20 > Index: combine-movs.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- combine-movs.c (revision 0) > +++ combine-movs.c (revision 0) > @@ -0,0 +1,12 @@ > +/* { dg-do compile } */ > +/* { dg-skip-if "" { arm_thumb1 } } */ > +/* { dg-options "-O" } */ > + > +void foo (unsigned long r[], unsigned int d) > +{ > + int i, n =3D d / 32; > + for (i =3D 0; i < n; ++i) > + r[i] =3D 0; > +} > + > +/* { dg-final { scan-assembler "movs\tr\[0-9\]" } } */ > Index: unsigned-extend-2.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- unsigned-extend-2.c (revision 0) > +++ unsigned-extend-2.c (revision 0) > @@ -0,0 +1,18 @@ > +/* { dg-do compile } */ > +/* { dg-require-effective-target arm_thumb2_ok } */ > +/* { dg-options "-O" } */ > + > +unsigned short foo (unsigned short x) > +{ > + unsigned char i =3D 0; > + for (i =3D 0; i < 8; i++) > + { > + x >>=3D 1; > + x &=3D 0x7fff; > + } > + return x; > +} > + > +/* { dg-final { scan-assembler "ands" } } */ > +/* { dg-final { scan-assembler-not "uxtb" } } */ > +/* { dg-final { scan-assembler-not "cmp" } } */