diff options
author | Joseph Myers <joseph@codesourcery.com> | 2008-07-08 21:23:56 +0100 |
---|---|---|
committer | Joseph Myers <jsm28@gcc.gnu.org> | 2008-07-08 21:23:56 +0100 |
commit | 10932211a8e7096f44a9295d6b73d54bfd2a246a (patch) | |
tree | c54e05c56fc9658609f5554851b85f2246026263 | |
parent | 87bd23b8e99eaabd98d7ec624ad779c4c00d74e0 (diff) | |
download | gcc-10932211a8e7096f44a9295d6b73d54bfd2a246a.zip gcc-10932211a8e7096f44a9295d6b73d54bfd2a246a.tar.gz gcc-10932211a8e7096f44a9295d6b73d54bfd2a246a.tar.bz2 |
reload.c (find_reloads_subreg_address): Do not require validity of address in original mode before reloading address.
* reload.c (find_reloads_subreg_address): Do not require validity
of address in original mode before reloading address.
From-SVN: r137639
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/reload.c | 6 |
2 files changed, 8 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 64888e9..5ba91fc 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2008-07-08 Joseph Myers <joseph@codesourcery.com> + + * reload.c (find_reloads_subreg_address): Do not require validity + of address in original mode before reloading address. + 2008-07-07 Tianwei Sheng <tianweis@google.com> * df-core.c (df_remove_problem): Adjust the access to avoid out of diff --git a/gcc/reload.c b/gcc/reload.c index e426d36..5a128f9 100644 --- a/gcc/reload.c +++ b/gcc/reload.c @@ -6049,7 +6049,6 @@ find_reloads_subreg_address (rtx x, int force_replace, int opnum, unsigned inner_size = GET_MODE_SIZE (GET_MODE (SUBREG_REG (x))); int offset; rtx orig = tem; - enum machine_mode orig_mode = GET_MODE (orig); int reloaded; /* For big-endian paradoxical subregs, SUBREG_BYTE does not @@ -6095,7 +6094,9 @@ find_reloads_subreg_address (rtx x, int force_replace, int opnum, /* For some processors an address may be valid in the original mode but not in a smaller mode. For example, ARM accepts a scaled index register in - SImode but not in HImode. find_reloads_address + SImode but not in HImode. Similarly, the address may + have been valid before the subreg offset was added, + but not afterwards. find_reloads_address assumes that we pass it a valid address, and doesn't force a reload. This will probably be fine if find_reloads_address finds some reloads. But if it @@ -6103,7 +6104,6 @@ find_reloads_subreg_address (rtx x, int force_replace, int opnum, valid address into an invalid one. Check for that here. */ if (reloaded != 1 - && strict_memory_address_p (orig_mode, XEXP (tem, 0)) && !strict_memory_address_p (GET_MODE (tem), XEXP (tem, 0))) push_reload (XEXP (tem, 0), NULL_RTX, &XEXP (tem, 0), (rtx*) 0, |