Skip to content

Commit deeedba

Browse files
committed
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
1 parent 2f2aeda commit deeedba

File tree

4 files changed

+38
-2
lines changed

4 files changed

+38
-2
lines changed

gcc/ChangeLog

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
2019-09-03 Jakub Jelinek <[email protected]>
2+
3+
PR target/91604
4+
* config/i386/i386-expand.c (split_double_mode): If there is more than
5+
one MEM operand and they are rtx_equal_p, reuse lo_half/hi_half from
6+
already split matching MEM operand instead of calling adjust_address
7+
again.
8+
19
2019-09-03 Ulrich Weigand <[email protected]>
210

311
* config.gcc: Obsolete spu target. Remove references to spu.

gcc/config/i386/i386-expand.c

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,8 @@ split_double_mode (machine_mode mode, rtx operands[],
106106
{
107107
machine_mode half_mode;
108108
unsigned int byte;
109+
rtx mem_op = NULL_RTX;
110+
int mem_num = 0;
109111

110112
switch (mode)
111113
{
@@ -129,8 +131,18 @@ split_double_mode (machine_mode mode, rtx operands[],
129131
but we still have to handle it. */
130132
if (MEM_P (op))
131133
{
132-
lo_half[num] = adjust_address (op, half_mode, 0);
133-
hi_half[num] = adjust_address (op, half_mode, byte);
134+
if (mem_op && rtx_equal_p (op, mem_op))
135+
{
136+
lo_half[num] = lo_half[mem_num];
137+
hi_half[num] = hi_half[mem_num];
138+
}
139+
else
140+
{
141+
mem_op = op;
142+
mem_num = num;
143+
lo_half[num] = adjust_address (op, half_mode, 0);
144+
hi_half[num] = adjust_address (op, half_mode, byte);
145+
}
134146
}
135147
else
136148
{

gcc/testsuite/ChangeLog

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
2019-09-03 Jakub Jelinek <[email protected]>
2+
3+
PR target/91604
4+
* gcc.target/i386/pr91604.c: New test.
5+
16
2019-09-03 Ulrich Weigand <[email protected]>
27

38
* lib/compat.exp: Remove references to spu.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
/* PR target/91604 */
2+
/* { dg-do compile } */
3+
/* { dg-options "-O3 -msse2 --param max-gcse-memory=0 -fno-rerun-cse-after-loop" } */
4+
5+
long long v;
6+
7+
void
8+
foo (void)
9+
{
10+
v = ~v;
11+
}

0 commit comments

Comments
 (0)