% 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
Confirmed.
Started with r235906.
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.
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
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
Fixed.