re PR target/58675 (ICE in rs6000_secondary_reload_inner:15460, type = store)
PR target/58675 PR target/57935 * config/rs6000/rs6000.c (rs6000_secondary_reload_inner): Use find_replacement on parts of insn rtl that might be reloaded. From-SVN: r207798
This commit is contained in:
parent
a2b33cc36b
commit
6164091674
@ -1,3 +1,10 @@
|
||||
2014-02-15 Alan Modra <amodra@gmail.com>
|
||||
|
||||
PR target/58675
|
||||
PR target/57935
|
||||
* config/rs6000/rs6000.c (rs6000_secondary_reload_inner): Use
|
||||
find_replacement on parts of insn rtl that might be reloaded.
|
||||
|
||||
2014-02-15 Richard Biener <rguenther@suse.de>
|
||||
|
||||
PR tree-optimization/60183
|
||||
|
@ -16170,7 +16170,7 @@ rs6000_secondary_reload_inner (rtx reg, rtx mem, rtx scratch, bool store_p)
|
||||
rs6000_secondary_reload_fail (__LINE__, reg, mem, scratch, store_p);
|
||||
|
||||
rclass = REGNO_REG_CLASS (regno);
|
||||
addr = XEXP (mem, 0);
|
||||
addr = find_replacement (&XEXP (mem, 0));
|
||||
|
||||
switch (rclass)
|
||||
{
|
||||
@ -16181,19 +16181,18 @@ rs6000_secondary_reload_inner (rtx reg, rtx mem, rtx scratch, bool store_p)
|
||||
if (GET_CODE (addr) == AND)
|
||||
{
|
||||
and_op2 = XEXP (addr, 1);
|
||||
addr = XEXP (addr, 0);
|
||||
addr = find_replacement (&XEXP (addr, 0));
|
||||
}
|
||||
|
||||
if (GET_CODE (addr) == PRE_MODIFY)
|
||||
{
|
||||
scratch_or_premodify = XEXP (addr, 0);
|
||||
scratch_or_premodify = find_replacement (&XEXP (addr, 0));
|
||||
if (!REG_P (scratch_or_premodify))
|
||||
rs6000_secondary_reload_fail (__LINE__, reg, mem, scratch, store_p);
|
||||
|
||||
if (GET_CODE (XEXP (addr, 1)) != PLUS)
|
||||
addr = find_replacement (&XEXP (addr, 1));
|
||||
if (GET_CODE (addr) != PLUS)
|
||||
rs6000_secondary_reload_fail (__LINE__, reg, mem, scratch, store_p);
|
||||
|
||||
addr = XEXP (addr, 1);
|
||||
}
|
||||
|
||||
if (GET_CODE (addr) == PLUS
|
||||
@ -16201,6 +16200,8 @@ rs6000_secondary_reload_inner (rtx reg, rtx mem, rtx scratch, bool store_p)
|
||||
|| !rs6000_legitimate_offset_address_p (PTImode, addr,
|
||||
false, true)))
|
||||
{
|
||||
/* find_replacement already recurses into both operands of
|
||||
PLUS so we don't need to call it here. */
|
||||
addr_op1 = XEXP (addr, 0);
|
||||
addr_op2 = XEXP (addr, 1);
|
||||
if (!legitimate_indirect_address_p (addr_op1, false))
|
||||
@ -16276,7 +16277,7 @@ rs6000_secondary_reload_inner (rtx reg, rtx mem, rtx scratch, bool store_p)
|
||||
|| !VECTOR_MEM_ALTIVEC_P (mode)))
|
||||
{
|
||||
and_op2 = XEXP (addr, 1);
|
||||
addr = XEXP (addr, 0);
|
||||
addr = find_replacement (&XEXP (addr, 0));
|
||||
}
|
||||
|
||||
/* If we aren't using a VSX load, save the PRE_MODIFY register and use it
|
||||
@ -16288,14 +16289,13 @@ rs6000_secondary_reload_inner (rtx reg, rtx mem, rtx scratch, bool store_p)
|
||||
|| and_op2 != NULL_RTX
|
||||
|| !legitimate_indexed_address_p (XEXP (addr, 1), false)))
|
||||
{
|
||||
scratch_or_premodify = XEXP (addr, 0);
|
||||
scratch_or_premodify = find_replacement (&XEXP (addr, 0));
|
||||
if (!legitimate_indirect_address_p (scratch_or_premodify, false))
|
||||
rs6000_secondary_reload_fail (__LINE__, reg, mem, scratch, store_p);
|
||||
|
||||
if (GET_CODE (XEXP (addr, 1)) != PLUS)
|
||||
addr = find_replacement (&XEXP (addr, 1));
|
||||
if (GET_CODE (addr) != PLUS)
|
||||
rs6000_secondary_reload_fail (__LINE__, reg, mem, scratch, store_p);
|
||||
|
||||
addr = XEXP (addr, 1);
|
||||
}
|
||||
|
||||
if (legitimate_indirect_address_p (addr, false) /* reg */
|
||||
|
Loading…
Reference in New Issue
Block a user