Bug 33329 - [4.3 Regression] ICE in expand_simple_binop, at optabs.c:1294
Summary: [4.3 Regression] ICE in expand_simple_binop, at optabs.c:1294
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 4.3.0
: P3 normal
Target Milestone: 4.3.0
Assignee: Uroš Bizjak
URL: http://gcc.gnu.org/ml/gcc-patches/200...
Keywords: ice-on-valid-code
Depends on: 26449 32123
Blocks:
  Show dependency treegraph
 
Reported: 2007-09-07 05:51 UTC by marcus
Modified: 2007-09-08 11:52 UTC (History)
2 users (show)

See Also:
Host:
Target: x86_64-*-*, i?86-*-*
Build:
Known to work:
Known to fail:
Last reconfirmed: 2007-09-07 10:42:23


Attachments
text.i (143 bytes, text/plain)
2007-09-07 05:52 UTC, marcus
Details

Note You need to log in before you can comment on or make changes to this bug.
Description marcus 2007-09-07 05:51:29 UTC
gcc version 4.3.0 20070906 (experimental) (GCC) 

/home/marcus/projects/gcc/BIN/bin/gcc  -O2 -ftree-vectorize -msse3 -c text.i
text.i: In function 'f':
text.i:11: internal compiler error: in expand_simple_binop, at optabs.c:1294
Comment 1 marcus 2007-09-07 05:52:16 UTC
Created attachment 14166 [details]
text.i

gcc -O2 -msse3 -ftree-vectorize -c text.i
Comment 2 Uroš Bizjak 2007-09-07 09:28:00 UTC
Also ICEs on i686-pc-linux-gnu with -msse2.

The problem is again in:

--cut here--
rtx
expand_simple_binop (enum machine_mode mode, enum rtx_code code, rtx op0,
                     rtx op1, rtx target, int unsignedp,
                     enum optab_methods methods)
{
  optab binop = code_to_optab[(int) code];
  gcc_assert (binop);
    
  return expand_binop (mode, binop, op0, op1, target, unsignedp, methods);
}
--cut here--

code_to_optab returns NULL for (unsupported) VEC_SELECT code. IIRC, we already have some discussion about this issue.

The backtrace is:

#0  fancy_abort (file=0x87879e0 "../../gcc-svn/trunk/gcc/optabs.c", line=1306, function=0x8787f50 "expand_simple_binop") at ../../gcc-svn/trunk/gcc/diagnostic.c:655
#1  0x082a29a7 in expand_simple_binop (mode=V2SImode, code=VEC_SELECT, op0=0xb7cf7340, op1=0xb7cd7870, target=0x0, unsignedp=1, methods=OPTAB_LIB_WIDEN) at ../../gcc-svn/trunk/gcc/optabs.c:1306
#2  0x081cbb18 in force_operand (value=0xb7c56b7c, target=0x0) at ../../gcc-svn/trunk/gcc/expr.c:6269
#3  0x081cb9a6 in force_operand (value=0xb7cd7878, target=0xb7cf7410) at ../../gcc-svn/trunk/gcc/expr.c:6277
#4  0x081cbbe9 in force_operand (value=0xb7c56b88, target=0xb7cf7400) at ../../gcc-svn/trunk/gcc/expr.c:6241
#5  0x0869c349 in move_invariant_reg (loop=0xb7cf833c, invno=0) at ../../gcc-svn/trunk/gcc/loop-invariant.c:1237
#6  0x0869d76d in move_loop_invariants () at ../../gcc-svn/trunk/gcc/loop-invariant.c:1304
#7  0x0869b495 in rtl_move_loop_invariants () at ../../gcc-svn/trunk/gcc/loop-init.c:237
#8  0x082aacdf in execute_one_pass (pass=0x8855060) at ../../gcc-svn/trunk/gcc/passes.c:1111
Comment 3 Richard Biener 2007-09-07 09:57:53 UTC
Confirmed.
Comment 4 Uroš Bizjak 2007-09-07 10:42:23 UTC
Similar to PR26449, which was _not_ fixed properly (so please don't mark this one as a duplicate). The problem that was misteriously fixed for one testcase just resurfaced again. Some info is also in PR32123.

Proposed patch that I'm going to re-test is at http://gcc.gnu.org/ml/gcc-patches/2007-05/msg01865.html
Comment 5 uros 2007-09-08 11:33:21 UTC
Subject: Bug 33329

Author: uros
Date: Sat Sep  8 11:33:08 2007
New Revision: 128269

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=128269
Log:
        PR target/33329
        PR target/26449
        * config/i386/sse.md (mulv4si3): Do not expand sse2 sequence.
        (*sse2_mulv4si3): New define_insn_and_split pattern. Split insn in
        split1 pass.
        (mulv16qi3): Implement as define_insn_and_split pattern instead of
        define_expand, to split insn in split1 pass.
        (mulv2di3): Ditto.

testsuite/ChangeLog:

        PR target/33329
        PR target/26449
        * gcc.target/i386/pr33329.c: New file.


Added:
    trunk/gcc/testsuite/gcc.target/i386/pr33329.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/i386/sse.md
    trunk/gcc/testsuite/ChangeLog

Comment 6 Uroš Bizjak 2007-09-08 11:52:57 UTC
Fixed.