re PR target/81121 (ICE: in extract_insn, at recog.c:2311)
authorJakub Jelinek <jakub@redhat.com>
Tue, 20 Jun 2017 07:04:27 +0000 (09:04 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Tue, 20 Jun 2017 07:04:27 +0000 (09:04 +0200)
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.

From-SVN: r249396

gcc/ChangeLog
gcc/config/i386/i386.md
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/i386/pr81121.c [new file with mode: 0644]

index 5af9611b8370d5cd354bca2623d212fc64786d3c..06e0cec4d144a56a7d212ff077f2b43589948ac5 100644 (file)
@@ -1,3 +1,9 @@
+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.
+
 2017-06-20  Michael Meissner  <meissner@linux.vnet.ibm.com>
 
        PR target/79799
index adc13a9afbcc083f99d1569ef070fe2f651f020e..40a20d0ec6e65ee1788f213a025b28b2b91f6bed 100644 (file)
 (define_split
   [(set (match_operand:MODEF 0 "sse_reg_operand")
        (float:MODEF (match_operand:SI 1 "nonimmediate_operand")))]
-  "TARGET_USE_VECTOR_CONVERTS
+  "TARGET_SSE2
+   && TARGET_USE_VECTOR_CONVERTS
    && optimize_function_for_speed_p (cfun)
    && reload_completed
    && (MEM_P (operands[1]) || TARGET_INTER_UNIT_MOVES_TO_VEC)
index 0809b2cd70a92b0224140a81932b067c32013fed..330a1085416d25fb116095566184edccf029bc3b 100644 (file)
@@ -1,3 +1,8 @@
+2017-06-20  Jakub Jelinek  <jakub@redhat.com>
+
+       PR target/81121
+       * gcc.target/i386/pr81121.c: New test.
+
 2017-06-20  Michael Meissner  <meissner@linux.vnet.ibm.com>
 
        PR target/79799
diff --git a/gcc/testsuite/gcc.target/i386/pr81121.c b/gcc/testsuite/gcc.target/i386/pr81121.c
new file mode 100644 (file)
index 0000000..aca74e9
--- /dev/null
@@ -0,0 +1,10 @@
+/* PR target/81121 */
+/* { dg-do compile } */
+/* { dg-options "-O0 -march=amdfam10 -mno-sse2" } */
+
+void
+foo (short *x, short *y)
+{
+  float a = 0;
+  y[0] = x[0] * a;
+}