Bug 81121 - [7/8 Regression] ICE: in extract_insn, at recog.c:2311
Summary: [7/8 Regression] ICE: in extract_insn, at recog.c:2311
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 7.1.1
: P2 normal
Target Milestone: 7.2
Assignee: Jakub Jelinek
URL:
Keywords: ice-on-valid-code
Depends on:
Blocks:
 
Reported: 2017-06-18 15:47 UTC by Markus Trippelsdorf
Modified: 2017-06-22 07:30 UTC (History)
1 user (show)

See Also:
Host:
Target: x86_64-*-*
Build:
Known to work: 6.3.1
Known to fail: 7.1.1
Last reconfirmed: 2017-06-19 00:00:00


Attachments
gcc8-pr81121.patch (566 bytes, patch)
2017-06-19 09:53 UTC, Jakub Jelinek
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Trippelsdorf 2017-06-18 15:47:05 UTC
% cat arithm.ii
void foo(short *p1, short *p2) {
  float a = 0;
  p2[0] = p1[0] * a;
}

 % g++ -march=amdfam10 -mno-sse2 -c arithm.ii
arithm.ii: In function ‘void foo(short int*, short int*)’:
arithm.ii:4:1: error: unrecognizable insn:
 }
 ^
(insn 25 24 13 2 (set (reg:V4SF 21 xmm0 [orig:88 _2 ] [88])
        (float:V4SF (reg:V4SI 21 xmm0 [orig:88 _2 ] [88]))) "arithm.ii":3 -1
     (nil))
arithm.ii:4:1: internal compiler error: in extract_insn, at recog.c:2311
Comment 1 Richard Biener 2017-06-19 08:19:51 UTC
Confirmed.
Comment 2 Martin Liška 2017-06-19 08:50:20 UTC
Started with r235906.
Comment 3 Jakub Jelinek 2017-06-19 09:53:17 UTC
Created attachment 41583 [details]
gcc8-pr81121.patch

Untested fix.  The old splitter had also && TARGET_SSE_MATH, dunno if we want to readd that too or not.  But && TARGET_SSE2 is certainly needed, the fact that output satisfies sse_reg_operand doesn't mean TARGET_SSE2 is enabled, and we need it for the instructions used in the splitter.
Comment 4 Jakub Jelinek 2017-06-20 07:04:59 UTC
Author: jakub
Date: Tue Jun 20 07:04:27 2017
New Revision: 249396

URL: https://gcc.gnu.org/viewcvs?rev=249396&root=gcc&view=rev
Log:
	PR target/81121
	* config/i386/i386.md (TARGET_USE_VECTOR_CONVERTS float si->{sf,df}
	splitter): Require TARGET_SSE2 in the condition.

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

Added:
    trunk/gcc/testsuite/gcc.target/i386/pr81121.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/i386/i386.md
    trunk/gcc/testsuite/ChangeLog
Comment 5 Jakub Jelinek 2017-06-21 22:19:06 UTC
Author: jakub
Date: Wed Jun 21 22:18:34 2017
New Revision: 249481

URL: https://gcc.gnu.org/viewcvs?rev=249481&root=gcc&view=rev
Log:
	Backported from mainline
	2017-06-20  Jakub Jelinek  <jakub@redhat.com>

	PR target/81121
	* config/i386/i386.md (TARGET_USE_VECTOR_CONVERTS float si->{sf,df}
	splitter): Require TARGET_SSE2 in the condition.

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

Added:
    branches/gcc-7-branch/gcc/testsuite/gcc.target/i386/pr81121.c
Modified:
    branches/gcc-7-branch/gcc/ChangeLog
    branches/gcc-7-branch/gcc/config/i386/i386.md
    branches/gcc-7-branch/gcc/testsuite/ChangeLog
Comment 6 Jakub Jelinek 2017-06-22 07:30:27 UTC
Fixed.