re PR target/91604 (ICE in extract_insn at recog.c:2310 since r272323)

PR target/91604
	* config/i386/i386-expand.c (split_double_mode): If there is more than
	one MEM operand and they are rtx_equal_p, reuse lo_half/hi_half from
	already split matching MEM operand instead of calling adjust_address
	again.

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

From-SVN: r275344
This commit is contained in:
Jakub Jelinek 2019-09-03 18:46:06 +02:00 committed by Jakub Jelinek
parent 2f2aeda98f
commit deeedbada1
4 changed files with 38 additions and 2 deletions

View File

@ -1,3 +1,11 @@
2019-09-03 Jakub Jelinek <jakub@redhat.com>
PR target/91604
* config/i386/i386-expand.c (split_double_mode): If there is more than
one MEM operand and they are rtx_equal_p, reuse lo_half/hi_half from
already split matching MEM operand instead of calling adjust_address
again.
2019-09-03 Ulrich Weigand <uweigand@de.ibm.com>
* config.gcc: Obsolete spu target. Remove references to spu.

View File

@ -106,6 +106,8 @@ split_double_mode (machine_mode mode, rtx operands[],
{
machine_mode half_mode;
unsigned int byte;
rtx mem_op = NULL_RTX;
int mem_num = 0;
switch (mode)
{
@ -129,8 +131,18 @@ split_double_mode (machine_mode mode, rtx operands[],
but we still have to handle it. */
if (MEM_P (op))
{
lo_half[num] = adjust_address (op, half_mode, 0);
hi_half[num] = adjust_address (op, half_mode, byte);
if (mem_op && rtx_equal_p (op, mem_op))
{
lo_half[num] = lo_half[mem_num];
hi_half[num] = hi_half[mem_num];
}
else
{
mem_op = op;
mem_num = num;
lo_half[num] = adjust_address (op, half_mode, 0);
hi_half[num] = adjust_address (op, half_mode, byte);
}
}
else
{

View File

@ -1,3 +1,8 @@
2019-09-03 Jakub Jelinek <jakub@redhat.com>
PR target/91604
* gcc.target/i386/pr91604.c: New test.
2019-09-03 Ulrich Weigand <uweigand@de.ibm.com>
* lib/compat.exp: Remove references to spu.

View File

@ -0,0 +1,11 @@
/* PR target/91604 */
/* { dg-do compile } */
/* { dg-options "-O3 -msse2 --param max-gcse-memory=0 -fno-rerun-cse-after-loop" } */
long long v;
void
foo (void)
{
v = ~v;
}