aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Stallman <rms@gnu.org>1993-05-02 14:01:25 +0000
committerRichard Stallman <rms@gnu.org>1993-05-02 14:01:25 +0000
commita3b75c072c06a26573736ab8a4cfa08e2b1614fd (patch)
treef6aed6a61c4f562b72d4dee84f0a7c6786f19fd3 /gcc
parent5b23f690b7d035cb5b44d9e51ea45dd48858f796 (diff)
downloadgcc-a3b75c072c06a26573736ab8a4cfa08e2b1614fd.zip
gcc-a3b75c072c06a26573736ab8a4cfa08e2b1614fd.tar.gz
gcc-a3b75c072c06a26573736ab8a4cfa08e2b1614fd.tar.bz2
(eliminate_regs...
(eliminate_regs, case SUBREG): Leave the SUBREG when the inner object is a pseudo on machines that extend byte loads (to be consistent with reload.c). From-SVN: r4304
Diffstat (limited to 'gcc')
-rw-r--r--gcc/reload1.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/gcc/reload1.c b/gcc/reload1.c
index 0fccda4..c963a33 100644
--- a/gcc/reload1.c
+++ b/gcc/reload1.c
@@ -2787,7 +2787,17 @@ eliminate_regs (x, mem_mode, insn)
{
if (GET_CODE (new) == MEM
&& (GET_MODE_SIZE (GET_MODE (x))
- <= GET_MODE_SIZE (GET_MODE (new))))
+ <= GET_MODE_SIZE (GET_MODE (new)))
+#if defined(BYTES_LOADS_ZERO_EXTEND) || defined(BYTE_LOADS_SIGN_EXTEND)
+ /* On these machines we will be reloading what is
+ inside the SUBREG if it originally was a pseudo and
+ the inner and outer modes are both a word or
+ smaller. So leave the SUBREG then. */
+ && ! (GET_CODE (SUBREG_REG (x)) == REG
+ && GET_MODE_SIZE (GET_MODE (x)) <= UNITS_PER_WORD
+ && GET_MODE_SIZE (GET_MODE (new)) <= UNITS_PER_WORD)
+#endif
+ )
{
int offset = SUBREG_WORD (x) * UNITS_PER_WORD;
enum machine_mode mode = GET_MODE (x);