backport: re PR target/81121 (ICE: in extract_insn, at recog.c:2311)

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.

From-SVN: r249481
This commit is contained in:
Jakub Jelinek 2017-06-22 00:18:34 +02:00 committed by Jakub Jelinek
parent 34bec96670
commit 67d4a7232c
4 changed files with 21 additions and 1 deletions

View File

@ -3,6 +3,10 @@
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.
PR sanitizer/81125
* ubsan.h (ubsan_encode_value): Workaround buggy clang++ parser
by removing enum keyword.

View File

@ -5218,7 +5218,8 @@
(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)

View File

@ -1,6 +1,11 @@
2017-06-21 Jakub Jelinek <jakub@redhat.com>
Backported from mainline
2017-06-20 Jakub Jelinek <jakub@redhat.com>
PR target/81121
* gcc.target/i386/pr81121.c: New test.
2017-06-19 Jakub Jelinek <jakub@redhat.com>
PR sanitizer/81125

View File

@ -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;
}