From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 51924 invoked by alias); 30 Apr 2015 11:53:39 -0000 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 Received: (qmail 51914 invoked by uid 89); 30 Apr 2015 11:53:38 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_00,SPF_PASS autolearn=ham version=3.3.2 X-HELO: eu-smtp-delivery-143.mimecast.com Received: from eu-smtp-delivery-143.mimecast.com (HELO eu-smtp-delivery-143.mimecast.com) (146.101.78.143) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 30 Apr 2015 11:53:37 +0000 Received: from cam-owa1.Emea.Arm.com (fw-tnat.cambridge.arm.com [217.140.96.140]) by uk-mta-11.uk.mimecast.lan; Thu, 30 Apr 2015 12:53:34 +0100 Received: from localhost ([10.1.2.79]) by cam-owa1.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.3959); Thu, 30 Apr 2015 12:53:34 +0100 From: Richard Sandiford To: Bin.Cheng Mail-Followup-To: Bin.Cheng ,gcc-patches List , richard.sandiford@arm.com Cc: gcc-patches List Subject: Re: Mostly rewrite genrecog References: <87egn5yis1.fsf@e105548-lin.cambridge.arm.com> Date: Thu, 30 Apr 2015 11:58:00 -0000 In-Reply-To: (Bin Cheng's message of "Thu, 30 Apr 2015 07:39:52 +0100") Message-ID: <87vbgdvnlt.fsf@e105548-lin.cambridge.arm.com> User-Agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 X-MC-Unique: P_JeIhbVRWeFXzQPviUfZg-1 Content-Type: text/plain; charset=WINDOWS-1252 Content-Transfer-Encoding: quoted-printable X-SW-Source: 2015-04/txt/msg02008.txt.bz2 Bin.Cheng writes: > Hi Richard, > I noticed that this patch caused ICE for gcc.target/arm/mmx-2.c on > arm-none-linux-gnueabi. Could you please have a look at it? > > The log message is as below, > /projects/.../src/gcc/gcc/testsuite/gcc.target/arm/mmx-2.c: In function '= foo': > /projects/.../src/gcc/gcc/testsuite/gcc.target/arm/mmx-2.c:166:1: > error: unrecognizable insn: > (insn 541 540 542 2 (set (reg:V4HI 512 [ D.4809 ]) > (vec_merge:V4HI (vec_select:V4HI (reg:V4HI 510 [ D.4806 ]) > (parallel [ > (const_int 2 [0x2]) > (const_int 0 [0]) > (const_int 3 [0x3]) > (const_int 1 [0x1]) > ])) > (vec_select:V4HI (reg:V4HI 511 [ D.4806 ]) > (parallel [ > (const_int 0 [0]) > (const_int 2 [0x2]) > (const_int 1 [0x1]) > (const_int 3 [0x3]) > ])) > (const_int 5 [0x5]))) > /projects/.../src/gcc/gcc/testsuite/gcc.target/arm/mmx-2.c:159 -1 > (nil)) > /projects/.../src/gcc/gcc/testsuite/gcc.target/arm/mmx-2.c:166:1: > internal compiler error: in extract_insn, at recog.c:2341 > 0xa42d2a _fatal_insn(char const*, rtx_def const*, char const*, int, char = const*) > /projects/.../src/gcc/gcc/rtl-error.c:110 > 0xa42d59 _fatal_insn_not_found(rtx_def const*, char const*, int, char con= st*) > /projects/.../src/gcc/gcc/rtl-error.c:118 > 0xa15ff7 extract_insn(rtx_insn*) > /projects/.../src/gcc/gcc/recog.c:2341 > 0x7ffb42 instantiate_virtual_regs_in_insn > /projects/.../src/gcc/gcc/function.c:1598 > 0x7ffb42 instantiate_virtual_regs > /projects/.../src/gcc/gcc/function.c:1966 > 0x7ffb42 execute > /projects/.../src/gcc/gcc/function.c:2015 > Please submit a full bug report, > with preprocessed source if appropriate. > Please include the complete backtrace with any bug report. > See for instructions. > > GCC is configured with > > gcc/configure --target=3Darm-none-linux-gnueabi --prefix=3D > --with-sysroot=3D... --enable-shared --disable-libsanitizer > --disable-libssp --disable-libmudflap > --with-plugin-ld=3Darm-none-linux-gnueabi-ld --enable-checking=3Dyes > --enable-languages=3Dc,c++,fortran --with-gmp=3D... --with-mpfr=3D... > --with-mpc=3D... --with-isl=3D... --with-cloog=3D... --with-arch=3Darmv7-a > --with-fpu=3Dvfpv3-d16 --with-float=3Dsoftfp --with-arch=3Darmv7-a Sorry about that, thought I'd tested that combination. I installed the patch below as obvious after testing on arm-linux-gnu. Thanks, Richard gcc/ * genrecog.c (simplify_tests): Check that CONST_INT and XWINT tests are for the same position. Index: gcc/genrecog.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 --- gcc/genrecog.c 2015-04-30 09:06:17.706538299 +0100 +++ gcc/genrecog.c 2015-04-30 12:49:58.689309916 +0100 @@ -1597,7 +1597,8 @@ simplify_tests (state *s) && d->if_statement_p (&label) && label =3D=3D CONST_INT) if (decision *second =3D d->first->to->singleton ()) - if (second->test.kind =3D=3D test::WIDE_INT_FIELD + if (d->test.pos =3D=3D second->test.pos + && second->test.kind =3D=3D test::WIDE_INT_FIELD && second->test.u.opno =3D=3D 0 && second->if_statement_p (&label) && IN_RANGE (int64_t (label),