Bug 64387 - ICE: in extract_insn, at recog.c:2327 (unrecognizable insn) with -ffloat-store -mavx512er
Summary: ICE: in extract_insn, at recog.c:2327 (unrecognizable insn) with -ffloat-stor...
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 5.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: ice-on-valid-code
Depends on:
Blocks:
 
Reported: 2014-12-23 17:22 UTC by Zdenek Sojka
Modified: 2016-04-04 11:18 UTC (History)
3 users (show)

See Also:
Host: x86_64-pc-linux-gnu
Target: x86_64-pc-linux-gnu
Build:
Known to work:
Known to fail: 5.0
Last reconfirmed:


Attachments
reduced testcase (142 bytes, text/x-csrc)
2014-12-23 17:22 UTC, Zdenek Sojka
Details
Proposed patch. (498 bytes, patch)
2014-12-29 13:59 UTC, tocarip.intel
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Zdenek Sojka 2014-12-23 17:22:19 UTC
Created attachment 34322 [details]
reduced testcase

Compiler output:
$ gcc -O2 -ftree-vectorize -ffloat-store -mavx512er testcase.c
testcase.c: In function 'foo':
testcase.c:12:1: error: unrecognizable insn:
 }
 ^
(insn 43 42 44 4 (set (reg:V8SF 121)
        (vec_select:V8SF (mem/c:V16SF (plus:DI (reg/f:DI 82 virtual-stack-vars)
                    (const_int -128 [0xffffffffffffff80])) [1 vect__10.6+0 S64 A512])
            (parallel [
                    (const_int 8 [0x8])
                    (const_int 9 [0x9])
                    (const_int 10 [0xa])
                    (const_int 11 [0xb])
                    (const_int 12 [0xc])
                    (const_int 13 [0xd])
                    (const_int 14 [0xe])
                    (const_int 15 [0xf])
                ]))) testcase.c:9 -1
     (nil))
testcase.c:12:1: internal compiler error: in extract_insn, at recog.c:2327
0xbd9d78 _fatal_insn(char const*, rtx_def const*, char const*, int, char const*)
        /mnt/svn/gcc-trunk/gcc/rtl-error.c:110
0xbd9e08 _fatal_insn_not_found(rtx_def const*, char const*, int, char const*)
        /mnt/svn/gcc-trunk/gcc/rtl-error.c:118
0xb903b8 extract_insn(rtx_insn*)
        /mnt/svn/gcc-trunk/gcc/recog.c:2327
0x96eecd instantiate_virtual_regs_in_insn
        /mnt/svn/gcc-trunk/gcc/function.c:1582
0x96eecd instantiate_virtual_regs
        /mnt/svn/gcc-trunk/gcc/function.c:1950
0x96eecd execute
        /mnt/svn/gcc-trunk/gcc/function.c:1999
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.

Tested revisions:
r219043 - ICE
4_9 r219040 - OK
Comment 1 tocarip.intel 2014-12-29 13:59:05 UTC
Created attachment 34343 [details]
Proposed patch.
Comment 2 tocarip.intel 2014-12-29 14:01:04 UTC
Can also be reproduced with -mavx2 instead of -mavx512er.
Proposed patch fixes both cases.
Testing in progress.
Comment 3 tocarip 2015-01-14 13:46:22 UTC
Author: tocarip
Date: Wed Jan 14 13:45:49 2015
New Revision: 219598

URL: https://gcc.gnu.org/viewcvs?rev=219598&root=gcc&view=rev
Log:
PR target/64387

gcc/
	* config/i386/sse.md (vec_unpacks_hi_v8sf): Fix predicate.
	(vec_unpacks_hi_v16sf): Ditto.

testsuite/
	* gcc.target/i386/pr64387.c: New test.

Added:
    trunk/gcc/testsuite/gcc.target/i386/pr64387.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/i386/sse.md
    trunk/gcc/testsuite/ChangeLog
Comment 4 tocarip 2015-02-17 10:35:43 UTC
Author: tocarip
Date: Tue Feb 17 10:35:12 2015
New Revision: 220755

URL: https://gcc.gnu.org/viewcvs?rev=220755&root=gcc&view=rev
Log:
Backported from mainline
2015-01-14  Ilya Tocar  <ilya.tocar@intel.com>

PR target/64387
* config/i386/sse.md (vec_unpacks_hi_v8sf): Fix predicate.

* gcc.target/i386/pr64387.c: New test.

Added:
    branches/gcc-4_8-branch/gcc/testsuite/gcc.target/i386/pr64387.c
Modified:
    branches/gcc-4_8-branch/gcc/ChangeLog
    branches/gcc-4_8-branch/gcc/config/i386/sse.md
    branches/gcc-4_8-branch/gcc/testsuite/ChangeLog
Comment 5 tocarip 2015-02-17 11:42:27 UTC
Author: tocarip
Date: Tue Feb 17 11:41:55 2015
New Revision: 220756

URL: https://gcc.gnu.org/viewcvs?rev=220756&root=gcc&view=rev
Log:
Backported from mainline
2015-01-14  Ilya Tocar  <ilya.tocar@intel.com>

PR target/64387
* config/i386/sse.md (vec_unpacks_hi_v8sf): Fix predicate.
(vec_unpacks_hi_v16sf): Ditto.

* gcc.target/i386/pr64387.c: New test.

Added:
    branches/gcc-4_9-branch/gcc/testsuite/gcc.target/i386/pr64387.c
Modified:
    branches/gcc-4_9-branch/gcc/ChangeLog
    branches/gcc-4_9-branch/gcc/config/i386/sse.md
    branches/gcc-4_9-branch/gcc/testsuite/ChangeLog
Comment 6 Kirill Yukhin 2016-04-04 11:18:25 UTC
Done