Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 134690 - [4.1/ICE] -msse2 -O1 -ftree-vectorize unrecognizable insn
Summary: [4.1/ICE] -msse2 -O1 -ftree-vectorize unrecognizable insn
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL: http://gcc.gnu.org/PR27790
Whiteboard: 4.1.1-r1
Keywords:
Depends on:
Blocks:
 
Reported: 2006-05-28 13:25 UTC by David Li
Modified: 2006-07-30 10:30 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
netpbm compile log (netpbm.log,199.58 KB, text/plain)
2006-05-28 13:26 UTC, David Li
Details
netpbm pre-processed code (netpbm-preprocessed.out,147.56 KB, application/octet-stream)
2006-05-28 13:29 UTC, David Li
Details
gimp compile log (gimp.log,856.43 KB, text/plain)
2006-05-28 13:30 UTC, David Li
Details
gimp pre-processed code (gimp-preprocessed.out.tar.bz2,135.07 KB, application/x-bzip)
2006-05-28 13:49 UTC, David Li
Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Li 2006-05-28 13:25:48 UTC
When emerging gimp or netpbm with both -march=pentium-m and -ftree-vectorizer in CFLAGS, gcc 4.1.1 make a internal compiler error. This only happens if both flags are in there.

netpbm error:
image-proc.c: In function 
Comment 1 David Li 2006-05-28 13:25:48 UTC
When emerging gimp or netpbm with both -march=pentium-m and -ftree-vectorizer in CFLAGS, gcc 4.1.1 make a internal compiler error. This only happens if both flags are in there.

netpbm error:
image-proc.c: In function binarize:
image-proc.c:335: error: unrecognizable insn:
(insn 94 93 95 13 (set (reg:V16QI 98)
        (us_minus:V16QI (mem:V16QI (plus:SI (reg:SI 68 [ D.6188 ])
                    (reg:SI 74 [ vect_p.122 ])) [0 S16 A128])
            (reg:V16QI 96))) -1 (nil)
    (nil))
image-proc.c:335: internal compiler error: in extract_insn, at recog.c:2084

Gimp error:
maze.c: In function run:
maze.c:276: error: unrecognizable insn:
(insn 682 681 683 56 (set (reg:V16QI 369)
        (us_minus:V16QI (mem:V16QI (plus:SI (reg:SI 107 [ D.37560 ])
                    (reg:SI 121 [ vect_p.174 ])) [0 S16 A128])
            (reg:V16QI 367))) -1 (nil)
    (nil))
maze.c:276: internal compiler error: in extract_insn, at recog.c:2084

# emerge -pv gimp

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R   ] media-gfx/gimp-2.2.10  USE="doc jpeg lcms mmx mng png python sse svg tiff wmf -aalib -debug -gimpprint -gtkhtml -hardened -smp" 0 kB

Total size of downloads: 0 kB

# emerge -pv gimp

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R   ] media-gfx/gimp-2.2.10  USE="doc jpeg lcms mmx mng png python sse svg tiff wmf -aalib -debug -gimpprint -gtkhtml -hardened -smp" 0 kB

Total size of downloads: 0 kB

# emerge --info
Portage 2.1_rc3 (default-linux/x86/2006.0, gcc-4.1.1, glibc-2.4-r3, 2.6.16-gentoo-r8 i686)
=================================================================
System uname: 2.6.16-gentoo-r8 i686 Intel(R) Pentium(R) M processor 1.80GHz
Gentoo Base System version 1.12.0
ccache version 2.4 [enabled]
dev-lang/python:     2.4.3-r1
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     2.4-r1
dev-util/confcache:  0.4.2-r1
sys-apps/sandbox:    1.2.18.1
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2
sys-devel/binutils:  2.16.1-r2
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r5
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=pentium-m -ftree-vectorize"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config /var/qmail/alias /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/revdep-rebuild /etc/splash /etc/terminfo /etc/texmf/web2c /usr/bin/startx /etc/env.d"
CXXFLAGS="-O2 -pipe -march=pentium-m -ftree-vectorize"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig ccache confcache distlocks keepwork metadata-transfer parallel-fetch sandbox sfperms strict userfetch userpriv usersandbox"
GENTOO_MIRRORS="http://mirror.datapipe.net/gentoo http://mirrors.acm.cs.rpi.edu/gentoo/ http://gentoo.mirrors.pair.com/ http://distfiles.gentoo.org http://www.ibiblio.org/pub/Linux/distributions/gentoo"
LANG="en_US.utf8"
LC_ALL="en_US.utf8"
LDFLAGS="-Wl,-O1"
LINGUAS="en"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_EXTRA_OPTS="--timeout=180 --exclude-from=/etc/portage/rsync_excludes"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage"
USE="x86 X a52 aac acl acpi aim alsa apache2 apm applet artworkextra asf async avahi bash-completion bitmap-fonts bonjour bzip2 cairo cdr chroot cli cracklib crypt css cups dbus dga dhcp djvu dmi doc dpms dri dts dvd dvdread dvi ecc eds effects encode esd evo evolution exif fam fastbuild fbcon ffmpeg firefox flac flash foomaticdb fortran gaim gd gdbm gencertdaily gif glibc-omitfp glitz glut gmp gnome gphoto2 gpm gstreamer gstreamer010 gtk gtk2 hal howl howl-compat hpn i8x0 icq idn imap imlib imlib2 inkjar innodb insecure-savers ipv6 isdnlog jabber java javascript jikes jpeg kdeenablefinal lcms libcaca libg++ libwww live lzo lzw mad matroska mdnsresponder-compat memlimit mhash mikmod mime ming mmx mmxext mng mono motif mozdevelop mozilla moznocompose moznoirc moznomail mp3 mpeg mpi mplayer mpm-worker msn musepack musicbrainz mysql mysqli nautilus ncurses network new-login nfs nls no-old-linux nodoc nogecko-sdk nosrc nptl nptlonly nsplugin ntfs offensive ogg openal opengl openssh oscar pam pcre pdf pdflib perl php pic png pnp pop pppd python qmail quicktime radiotap rar readline real reflection reiser4 reiserfs rtc samba sdl session silc smarty sockets speex spell spl sse sse2 ssl svg svga sysfs syslog sysvipc t1lib tcpd tetex tga theora threads tiff transcode truetype truetype-fonts type1 type1-fonts udev unicode usb userlocales utf8 v4l v4l2 vcd videos visualization vorbis widescreen wifi win32codecs wmf x264 xine xml xml2 xmlreader xmlwriter xorg xpm xscreensaver xv xvid xvmc yahoo zlib elibc_glibc input_devices_keyboard input_devices_mouse input_devices_synaptics kernel_linux linguas_en userland_GNU video_cards_radeon video_cards_vesa"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, MAKEOPTS

Compile logs and preprocessed output attached in a minute...
Comment 2 David Li 2006-05-28 13:26:59 UTC
Created attachment 87756 [details]
netpbm compile log
Comment 3 David Li 2006-05-28 13:29:20 UTC
Created attachment 87757 [details]
netpbm pre-processed code
Comment 4 David Li 2006-05-28 13:30:06 UTC
Created attachment 87758 [details]
gimp compile log
Comment 5 David Li 2006-05-28 13:49:27 UTC
Created attachment 87761 [details]
gimp pre-processed code
Comment 6 Mark Loeser (RETIRED) gentoo-dev 2006-05-28 21:20:24 UTC
Confirmed, reduced, and reported upstream.

Occurs with: -ftree-vectorize -O1 -msse2

Reduced testcase:

void binarize ()                                                                                                            
{                                                                                                                           
  unsigned i, npixels;                                                                                                      
  unsigned char *b;                                                                                                         
  if (i == 1)                                                                                                               
    {                                                                                                                       
      for (i = 0; i < npixels; i++)                                                                                         
        b[i] = (b[i] > 225 ? 0xff : 0);                                                                                     
    }                                                                                                                       
} 
Comment 7 Mark Loeser (RETIRED) gentoo-dev 2006-06-04 14:43:51 UTC
I backported upstream's nice one line fix and this will be fixed for 4.1.1-r1, which will probably not be released for a little while :)
Comment 8 David Li 2006-07-26 12:36:27 UTC
By the way, Gimp fixed this issue upstream.
netpbm is still having issues.
Comment 9 SpanKY gentoo-dev 2006-07-30 10:30:19 UTC
s/Gimp fixed/Gimp worked around/