Bug 53749 - ice in expand_shift_1
Summary: ice in expand_shift_1
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 4.8.0
: P3 normal
Target Milestone: 4.8.0
Assignee: Richard Henderson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-22 08:34 UTC by David Binderman
Modified: 2012-06-27 21:30 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2012-06-22 00:00:00


Attachments
C source code (44.82 KB, text/plain)
2012-06-22 08:34 UTC, David Binderman
Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Binderman 2012-06-22 08:34:03 UTC
Created attachment 27688 [details]
C source code

I just tried to compile the package slang-2.2.4
on gcc-4.8 trunk dated 20120620 on an AMD x86_64 box.

The compiler said

/home/dcb/rpmbuild/BUILD/slang-2.2.4/src/slarith.inc:697:32: internal compiler error: in expand_shift_1, at expmed.c:2335
  for (n = 0; n < na; n++) b[n] = (2 * a[n]);
                                ^
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

Preprocessed source code attached. Flag -O3 required.
Comment 1 H.J. Lu 2012-06-22 13:52:52 UTC
It is caused by revision 188786:

http://gcc.gnu.org/ml/gcc-cvs/2012-06/msg00696.html
Comment 2 Richard Henderson 2012-06-22 16:47:00 UTC
Mine.
Comment 3 Richard Henderson 2012-06-23 16:42:26 UTC
Author: rth
Date: Sat Jun 23 16:42:19 2012
New Revision: 188909

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=188909
Log:
PR target/53749
        * config/i386/i386.c (ix86_rtx_costs): Add reasonable costs for
        V*QImode shifts and multiply.
        (ix86_expand_vecop_qihi): Support shifts.
        * config/i386/i386.md (any_shift): New code iterator.
        * config/i386/sse.md (ashlv16qi3): Merge ...
        (<any_shiftrt>v16qi3): ... into ...
        (<any_shift><VI1_AVX2>3): ... here.  Use ix86_expand_vecop_qihi
        to support SSE and AVX.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/i386/i386.c
    trunk/gcc/config/i386/i386.md
    trunk/gcc/config/i386/sse.md
Comment 4 Richard Henderson 2012-06-23 20:02:33 UTC
Fixed.
Comment 5 Richard Henderson 2012-06-27 21:30:45 UTC
Author: rth
Date: Wed Jun 27 21:30:41 2012
New Revision: 189026

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=189026
Log:
i386: Fix logic error in r188785

PR target/53749
        * config/i386/i386.c (ix86_rtx_costs): Fix typo vs UNITS_PER_WORD
        in 2012-06-23 change.  Adjust two other DImode tests as well.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/i386/i386.c