public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/50482] New: [4.7 regression] internal compiler error at recog.c:2137
@ 2011-09-22 10:53 jojelino at gmail dot com
  2011-09-22 12:27 ` [Bug target/50482] " ubizjak at gmail dot com
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: jojelino at gmail dot com @ 2011-09-22 10:53 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50482

             Bug #: 50482
           Summary: [4.7 regression] internal compiler error at
                    recog.c:2137
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: jojelino@gmail.com


Created attachment 25337
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25337
preprocessed source

$ gcc   -DHAVE_MKSTEMP   -DHAVE_FONTCONFIG -DHAVE_LIBIDN -DHAVE_SETLOCALE 
-DHAVE_DBUS -DHAVE_BSWAP32 -DHAVE_BYTESWAP_H -O4 -mfpmath=sse -march=native
-mtune=native -g -flto -Wall -Wstrict-prototypes -Wundef -Wmissing-declarations
-Wmissing-prototypes -Wwrite-strings -Wno-strict-aliasing
-Wdeclaration-after-statement -fno-builtin -fno-common -DHAVE_STDINT_H=1
-DHAVE_SYS_TIME_H=1 -DGX_COLOR_INDEX_TYPE="unsigned long long" 
-DUSE_LIBICONV_GNU  -I./psi -I./obj -I./obj -I./base  -o ./obj/zimage3.o -c
./psi/zimage3.c -v -save-temps
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/i686-pc-cygwin/4.7.0/lto-wrapper.exe
Target: i686-pc-cygwin
Configured with: ./configure --config-cache --prefix=/usr
--disable-win32-registry --enable-threads=win32 --enable-languages=c,c++,lto
--with-win32-nlsapi=unicode --enable-tls --disable-bootstrap --enable-shared
--disable-sjlj-exceptions --enable-gomp --enable-cloog-backend=isl :
(reconfigured) ./configure --config-cache --prefix=/usr
--disable-win32-registry --enable-threads=win32 --with-win32-nlsapi=unicode
--enable-tls --disable-bootstrap --enable-shared --disable-sjlj-exceptions
--enable-gomp --enable-cloog-backend=isl --enable-languages=c,c++,lto
--no-create --no-recursion : (reconfigured) ./configure --config-cache
--prefix=/usr --disable-win32-registry --enable-threads=win32
--with-win32-nlsapi=unicode --enable-tls --disable-bootstrap --enable-shared
--disable-sjlj-exceptions --enable-gomp --enable-cloog-backend=isl
--enable-languages=c,c++,lto --no-create --no-recursion
Thread model: win32
gcc version 4.7.0 20110922 (experimental) (GCC)
COLLECT_GCC_OPTIONS='-D' 'HAVE_MKSTEMP' '-D' 'HAVE_FONTCONFIG' '-D'
'HAVE_LIBIDN' '-D' 'HAVE_SETLOCALE' '-D' 'HAVE_DBUS' '-D' 'HAVE_BSWAP32' '-D'
'HAVE_BYTESWAP_H' '-O4' '-mfpmath=sse' '-march=native' '-mtune=native' '-g'
'-flto' '-Wall' '-Wstrict-prototypes' '-Wundef' '-Wmissing-declarations'
'-Wmissing-prototypes' '-Wwrite-strings' '-Wno-strict-aliasing'
'-Wdeclaration-after-statement' '-fno-builtin' '-fno-common' '-D'
'HAVE_STDINT_H=1' '-D' 'HAVE_SYS_TIME_H=1' '-D' 'GX_COLOR_INDEX_TYPE=unsigned
long long' '-D' 'USE_LIBICONV_GNU' '-I' './psi' '-I' './obj' '-I' './obj' '-I'
'./base' '-o' './obj/zimage3.o' '-c' '-v' '-save-temps'
 /usr/libexec/gcc/i686-pc-cygwin/4.7.0/cc1.exe -E -quiet -v -I ./psi -I ./obj
-I ./obj -I ./base -D__CYGWIN32__ -D__CYGWIN__ -Dunix -D__unix__ -D__unix
-idirafter
/usr/lib/gcc/i686-pc-cygwin/4.7.0/../../../../i686-pc-cygwin/lib/../include/w32api
-idirafter
/usr/lib/gcc/i686-pc-cygwin/4.7.0/../../../../i686-pc-cygwin/lib/../../include/w32api
-D HAVE_MKSTEMP -D HAVE_FONTCONFIG -D HAVE_LIBIDN -D HAVE_SETLOCALE -D
HAVE_DBUS -D HAVE_BSWAP32 -D HAVE_BYTESWAP_H -D HAVE_STDINT_H=1 -D
HAVE_SYS_TIME_H=1 -D GX_COLOR_INDEX_TYPE=unsigned long long -D USE_LIBICONV_GNU
./psi/zimage3.c -march=core2 -mcx16 -msahf -mno-movbe -mno-aes -mno-pclmul
-mno-popcnt -mno-abm -mno-lwp -mno-fma -mno-fma4 -mno-xop -mno-bmi -mno-bmi2
-mno-tbm -mno-avx -mno-avx2 -mno-sse4.2 -msse4.1 -mno-lzcnt --param
l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=2048
-mtune=core2 -mfpmath=sse -Wall -Wstrict-prototypes -Wundef
-Wmissing-declarations -Wmissing-prototypes -Wwrite-strings
-Wno-strict-aliasing -Wdeclaration-after-statement -flto -fno-builtin
-fno-common -g -fworking-directory -O4 -fpch-preprocess -o zimage3.i
ignoring duplicate directory "/usr/include"
ignoring duplicate directory
"/usr/lib/gcc/i686-pc-cygwin/4.7.0/../../../../i686-pc-cygwin/lib/../../include/w32api"
ignoring duplicate directory "./obj"
#include "..." search starts here:
#include <...> search starts here:
 ./psi
 ./obj
 ./base
 /usr/lib/gcc/i686-pc-cygwin/4.7.0/include
 /usr/local/include
 /usr/lib/gcc/i686-pc-cygwin/4.7.0/include-fixed
 /usr/lib/gcc/i686-pc-cygwin/4.7.0/../../../../i686-pc-cygwin/include

/usr/lib/gcc/i686-pc-cygwin/4.7.0/../../../../i686-pc-cygwin/lib/../include/w32api
End of search list.
COLLECT_GCC_OPTIONS='-D' 'HAVE_MKSTEMP' '-D' 'HAVE_FONTCONFIG' '-D'
'HAVE_LIBIDN' '-D' 'HAVE_SETLOCALE' '-D' 'HAVE_DBUS' '-D' 'HAVE_BSWAP32' '-D'
'HAVE_BYTESWAP_H' '-O4' '-mfpmath=sse' '-march=native' '-mtune=native' '-g'
'-flto' '-Wall' '-Wstrict-prototypes' '-Wundef' '-Wmissing-declarations'
'-Wmissing-prototypes' '-Wwrite-strings' '-Wno-strict-aliasing'
'-Wdeclaration-after-statement' '-fno-builtin' '-fno-common' '-D'
'HAVE_STDINT_H=1' '-D' 'HAVE_SYS_TIME_H=1' '-D' 'GX_COLOR_INDEX_TYPE=unsigned
long long' '-D' 'USE_LIBICONV_GNU' '-I' './psi' '-I' './obj' '-I' './obj' '-I'
'./base' '-o' './obj/zimage3.o' '-c' '-v' '-save-temps'
 /usr/libexec/gcc/i686-pc-cygwin/4.7.0/cc1.exe -fpreprocessed zimage3.i
-march=core2 -mcx16 -msahf -mno-movbe -mno-aes -mno-pclmul -mno-popcnt -mno-abm
-mno-lwp -mno-fma -mno-fma4 -mno-xop -mno-bmi -mno-bmi2 -mno-tbm -mno-avx
-mno-avx2 -mno-sse4.2 -msse4.1 -mno-lzcnt --param l1-cache-size=32 --param
l1-cache-line-size=64 --param l2-cache-size=2048 -mtune=core2 -quiet -dumpbase
zimage3.c -mfpmath=sse -auxbase-strip ./obj/zimage3.o -g -O4 -Wall
-Wstrict-prototypes -Wundef -Wmissing-declarations -Wmissing-prototypes
-Wwrite-strings -Wno-strict-aliasing -Wdeclaration-after-statement -version
-flto -fno-builtin -fno-common -o zimage3.s
GNU C (GCC) version 4.7.0 20110922 (experimental) (i686-pc-cygwin)
        compiled by GNU C version 4.7.0 20110921 (experimental), GMP version
5.0.0, MPFR version 3.0.1-p4, MPC version 0.8.1
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
GNU C (GCC) version 4.7.0 20110922 (experimental) (i686-pc-cygwin)
        compiled by GNU C version 4.7.0 20110921 (experimental), GMP version
5.0.0, MPFR version 3.0.1-p4, MPC version 0.8.1
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
Compiler executable checksum: 5644b38a871d783c12922a51d49bec32
./psi/zimage3.c: In function 'zimage4':
./psi/zimage3.c:123:1: error: unrecognizable insn:
(insn 86 85 87 9 (set (subreg:V16QI (reg:V4SI 117) 0)
        (unspec:V16QI [
                (subreg:V16QI (reg:V4SI 97 [ vect_var_.19 ]) 0)
                (const_vector:V16QI [
                        (const_int -1 [0xffffffffffffffff])
                        (const_int -1 [0xffffffffffffffff])
                        (const_int -1 [0xffffffffffffffff])
                        (const_int -1 [0xffffffffffffffff])
                        (const_int -1 [0xffffffffffffffff])
                        (const_int -1 [0xffffffffffffffff])
                        (const_int -1 [0xffffffffffffffff])
                        (const_int -1 [0xffffffffffffffff])
                        (const_int -1 [0xffffffffffffffff])
                        (const_int -1 [0xffffffffffffffff])
                        (const_int -1 [0xffffffffffffffff])
                        (const_int -1 [0xffffffffffffffff])
                        (const_int -1 [0xffffffffffffffff])
                        (const_int -1 [0xffffffffffffffff])
                        (const_int -1 [0xffffffffffffffff])
                        (const_int -1 [0xffffffffffffffff])
                    ])
                (subreg:V16QI (reg:V4SI 118) 0)
            ] UNSPEC_BLENDV)) ./psi/zimage3.c:107 -1
     (nil))
./psi/zimage3.c:123:1: internal compiler error: in extract_insn, at
recog.c:2137
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug target/50482] [4.7 regression] internal compiler error at recog.c:2137
  2011-09-22 10:53 [Bug target/50482] New: [4.7 regression] internal compiler error at recog.c:2137 jojelino at gmail dot com
@ 2011-09-22 12:27 ` ubizjak at gmail dot com
  2011-09-22 16:33 ` jakub at gcc dot gnu.org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: ubizjak at gmail dot com @ 2011-09-22 12:27 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50482

Uros Bizjak <ubizjak at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2011-09-22
   Target Milestone|---                         |4.7.0
     Ever Confirmed|0                           |1

--- Comment #1 from Uros Bizjak <ubizjak at gmail dot com> 2011-09-22 11:54:40 UTC ---
Confirmed with -O3 -msse4, caused by recent change.

Untested patch:
Index: i386.c
===================================================================
--- i386.c    (revision 179076)
+++ i386.c    (working copy)
@@ -18911,6 +18911,9 @@ ix86_expand_sse_movcc (rtx dest, rtx cmp, rtx op_t
     {
       rtx (*gen) (rtx, rtx, rtx, rtx) = NULL;

+      if (!nonimmediate_operand (op_true, mode))
+    op_true = force_reg (mode, op_true);
+
       op_false = force_reg (mode, op_false);

       switch (mode)


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug target/50482] [4.7 regression] internal compiler error at recog.c:2137
  2011-09-22 10:53 [Bug target/50482] New: [4.7 regression] internal compiler error at recog.c:2137 jojelino at gmail dot com
  2011-09-22 12:27 ` [Bug target/50482] " ubizjak at gmail dot com
@ 2011-09-22 16:33 ` jakub at gcc dot gnu.org
  2011-09-22 17:02 ` ubizjak at gmail dot com
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-09-22 16:33 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50482

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-09-22 16:24:34 UTC ---
Sorry for that, yeah, the patch looks right.
BTW, for CONST_VECTOR containing all bits set we could do better,
for VEC_COND_EXPR x < y ? -1 : z we can do mask = x < y; z | mask;
and for x < y ? z : -1; and for if the comparison is reversible mask = x >= y;
z | mask.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug target/50482] [4.7 regression] internal compiler error at recog.c:2137
  2011-09-22 10:53 [Bug target/50482] New: [4.7 regression] internal compiler error at recog.c:2137 jojelino at gmail dot com
  2011-09-22 12:27 ` [Bug target/50482] " ubizjak at gmail dot com
  2011-09-22 16:33 ` jakub at gcc dot gnu.org
@ 2011-09-22 17:02 ` ubizjak at gmail dot com
  2011-09-22 17:05 ` jakub at gcc dot gnu.org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: ubizjak at gmail dot com @ 2011-09-22 17:02 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50482

--- Comment #3 from Uros Bizjak <ubizjak at gmail dot com> 2011-09-22 16:27:01 UTC ---
Shorter testcase:

void
test (int code, unsigned int * image, int * colors)
{
  int i;

  for (i = 0; i < code; ++i)
    image[i] = (colors[i] < 0 ? ~(unsigned int) 0 : colors[i]);
}

gcc -O3 -msse4.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug target/50482] [4.7 regression] internal compiler error at recog.c:2137
  2011-09-22 10:53 [Bug target/50482] New: [4.7 regression] internal compiler error at recog.c:2137 jojelino at gmail dot com
                   ` (2 preceding siblings ...)
  2011-09-22 17:02 ` ubizjak at gmail dot com
@ 2011-09-22 17:05 ` jakub at gcc dot gnu.org
  2011-09-22 17:07 ` jakub at gcc dot gnu.org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-09-22 17:05 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50482

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-09-22 16:33:27 UTC ---
unsigned short a[1024], b[1024];

void
foo (void)
{
  int i;
  for (i = 0; i < 1024; i++)
    a[i] = b[i] > 10 ? b[i] : 0xffff;
}

ICEs too with -O3 -msse4.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug target/50482] [4.7 regression] internal compiler error at recog.c:2137
  2011-09-22 10:53 [Bug target/50482] New: [4.7 regression] internal compiler error at recog.c:2137 jojelino at gmail dot com
                   ` (3 preceding siblings ...)
  2011-09-22 17:05 ` jakub at gcc dot gnu.org
@ 2011-09-22 17:07 ` jakub at gcc dot gnu.org
  2011-09-22 17:42 ` uros at gcc dot gnu.org
  2011-09-22 20:29 ` ubizjak at gmail dot com
  6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-09-22 17:07 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50482

--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-09-22 17:02:14 UTC ---
Created attachment 25342
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25342
gcc47-all-ones-cst.patch

Patch to optimize vector x < y ? -1 : z and vector and/ior/xor with -1 operand.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug target/50482] [4.7 regression] internal compiler error at recog.c:2137
  2011-09-22 10:53 [Bug target/50482] New: [4.7 regression] internal compiler error at recog.c:2137 jojelino at gmail dot com
                   ` (4 preceding siblings ...)
  2011-09-22 17:07 ` jakub at gcc dot gnu.org
@ 2011-09-22 17:42 ` uros at gcc dot gnu.org
  2011-09-22 20:29 ` ubizjak at gmail dot com
  6 siblings, 0 replies; 8+ messages in thread
From: uros at gcc dot gnu.org @ 2011-09-22 17:42 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50482

--- Comment #6 from uros at gcc dot gnu.org 2011-09-22 17:35:06 UTC ---
Author: uros
Date: Thu Sep 22 17:35:00 2011
New Revision: 179094

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=179094
Log:
    PR target/50482
    * config/i386/i386.c (ix86_expand_sse_movcc): When generating
    blendv, force op_true to register if it doesn't satisfy
    nonimmediate_operand predicate.

testsuite/ChangeLog:

    PR target/50482
    * gcc.target/i386/pr50482.c: New test.


Added:
    trunk/gcc/testsuite/gcc.target/i386/pr50482.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/i386/i386.c
    trunk/gcc/testsuite/ChangeLog


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug target/50482] [4.7 regression] internal compiler error at recog.c:2137
  2011-09-22 10:53 [Bug target/50482] New: [4.7 regression] internal compiler error at recog.c:2137 jojelino at gmail dot com
                   ` (5 preceding siblings ...)
  2011-09-22 17:42 ` uros at gcc dot gnu.org
@ 2011-09-22 20:29 ` ubizjak at gmail dot com
  6 siblings, 0 replies; 8+ messages in thread
From: ubizjak at gmail dot com @ 2011-09-22 20:29 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50482

Uros Bizjak <ubizjak at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
                URL|                            |http://gcc.gnu.org/ml/gcc-p
                   |                            |atches/2011-09/msg01347.htm
                   |                            |l
         Resolution|                            |FIXED

--- Comment #7 from Uros Bizjak <ubizjak at gmail dot com> 2011-09-22 19:32:50 UTC ---
Fixed.


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2011-09-22 19:33 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-22 10:53 [Bug target/50482] New: [4.7 regression] internal compiler error at recog.c:2137 jojelino at gmail dot com
2011-09-22 12:27 ` [Bug target/50482] " ubizjak at gmail dot com
2011-09-22 16:33 ` jakub at gcc dot gnu.org
2011-09-22 17:02 ` ubizjak at gmail dot com
2011-09-22 17:05 ` jakub at gcc dot gnu.org
2011-09-22 17:07 ` jakub at gcc dot gnu.org
2011-09-22 17:42 ` uros at gcc dot gnu.org
2011-09-22 20:29 ` ubizjak at gmail dot com

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).