Bin.Cheng <amker.ch...@gmail.com> 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 const*) > /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 <http://gcc.gnu.org/bugs.html> for instructions. > > GCC is configured with > > gcc/configure --target=arm-none-linux-gnueabi --prefix= > --with-sysroot=... --enable-shared --disable-libsanitizer > --disable-libssp --disable-libmudflap > --with-plugin-ld=arm-none-linux-gnueabi-ld --enable-checking=yes > --enable-languages=c,c++,fortran --with-gmp=... --with-mpfr=... > --with-mpc=... --with-isl=... --with-cloog=... --with-arch=armv7-a > --with-fpu=vfpv3-d16 --with-float=softfp --with-arch=armv7-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 =================================================================== --- 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 == CONST_INT) if (decision *second = d->first->to->singleton ()) - if (second->test.kind == test::WIDE_INT_FIELD + if (d->test.pos == second->test.pos + && second->test.kind == test::WIDE_INT_FIELD && second->test.u.opno == 0 && second->if_statement_p (&label) && IN_RANGE (int64_t (label),