From a3b75c072c06a26573736ab8a4cfa08e2b1614fd Mon Sep 17 00:00:00 2001 From: Richard Stallman Date: Sun, 2 May 1993 14:01:25 +0000 Subject: (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 --- gcc/reload1.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'gcc') 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); -- cgit v1.1