Commit 51c561e3 by Jakub Jelinek Committed by Jakub Jelinek

alpha.c (some_small_symbolic_mem_operand): Look into (and:DI () (const_int -8)).

	* config/alpha/alpha.c (some_small_symbolic_mem_operand): Look into
	(and:DI () (const_int -8)).
	(split_small_symbolic_mem_operand): Split
	(mem (and:DI () (const_int -8)).

	* gcc.dg/20020116-1.c: New test.

From-SVN: r48920
parent b8c1a6b8
2002-01-16 Jakub Jelinek <jakub@redhat.com> 2002-01-16 Jakub Jelinek <jakub@redhat.com>
* config/alpha/alpha.c (some_small_symbolic_mem_operand): Look into
(and:DI () (const_int -8)).
(split_small_symbolic_mem_operand): Split
(mem (and:DI () (const_int -8)).
2002-01-16 Jakub Jelinek <jakub@redhat.com>
PR target/5309: PR target/5309:
* config/sparc/sparc.c (ultrasparc_adjust_cost): Handle TYPE_IDIV the * config/sparc/sparc.c (ultrasparc_adjust_cost): Handle TYPE_IDIV the
same way as TYPE_IMUL. same way as TYPE_IMUL.
......
...@@ -1878,8 +1878,16 @@ some_small_symbolic_mem_operand (x, mode) ...@@ -1878,8 +1878,16 @@ some_small_symbolic_mem_operand (x, mode)
while (GET_RTX_CLASS (GET_CODE (x)) == '1') while (GET_RTX_CLASS (GET_CODE (x)) == '1')
x = XEXP (x, 0); x = XEXP (x, 0);
return (GET_CODE (x) == MEM if (GET_CODE (x) != MEM)
&& small_symbolic_operand (XEXP (x, 0), Pmode)); return 0;
x = XEXP (x, 0);
/* If this is an ldq_u type address, discard the outer AND. */
if (GET_CODE (x) == AND && GET_MODE (x) == DImode
&& GET_CODE (XEXP (x, 1)) == CONST_INT
&& INTVAL (XEXP (x, 1)) == -8)
x = XEXP (x, 0);
return small_symbolic_operand (x, Pmode);
} }
rtx rtx
...@@ -1890,7 +1898,17 @@ split_small_symbolic_mem_operand (x) ...@@ -1890,7 +1898,17 @@ split_small_symbolic_mem_operand (x)
if (GET_CODE (x) == MEM) if (GET_CODE (x) == MEM)
{ {
rtx tmp = gen_rtx_LO_SUM (DImode, pic_offset_table_rtx, XEXP (x, 0)); rtx tmp = XEXP (x, 0);
if (GET_CODE (tmp) == AND && GET_MODE (tmp) == DImode
&& GET_CODE (XEXP (tmp, 1)) == CONST_INT
&& INTVAL (XEXP (tmp, 1)) == -8)
{
tmp = gen_rtx_LO_SUM (DImode, pic_offset_table_rtx, XEXP (tmp, 0));
tmp = gen_rtx_AND (DImode, tmp, GEN_INT (-8));
}
else
tmp = gen_rtx_LO_SUM (DImode, pic_offset_table_rtx, tmp);
return replace_equiv_address (x, tmp); return replace_equiv_address (x, tmp);
} }
......
2002-01-16 Jakub Jelinek <jakub@redhat.com> 2002-01-16 Jakub Jelinek <jakub@redhat.com>
* gcc.dg/ultrasp4.c: New test. * gcc.dg/20020116-2.c: New test.
2002-01-16 Jakub Jelinek <jakub@redhat.com> * gcc.dg/ultrasp4.c: New test.
* gcc.dg/20020116-2.c: New test. * gcc.dg/20020116-1.c: New test.
2002-01-15 Geoffrey Keating <geoffk@redhat.com> 2002-01-15 Geoffrey Keating <geoffk@redhat.com>
......
/* This testcase ICEd on Alpha because ldq_u argument was not subject to
small_symbolic_mem_operand splitting. */
/* { dg-do compile } */
/* { dg-options "-O2" } */
/* { dg-options "-O2 -fpic -mexplicit-relocs -mcpu=ev4" { target alpha*-*-* } } */
static char a;
char *b;
void foo (void)
{
register char *c;
c = b;
*c = a;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment