diff options
author | Jim Wilson <wilson@cygnus.com> | 1998-01-22 14:48:58 +0000 |
---|---|---|
committer | Jim Wilson <wilson@gcc.gnu.org> | 1998-01-22 06:48:58 -0800 |
commit | 6d49a073b49d3f2f467ebf6cc36ec12f8a3ec012 (patch) | |
tree | fb7689cb1457dafc5fe17efd0f4ff136c93ea12a /gcc/reload1.c | |
parent | c485e6a0c979b36c0785b57cbf17664fe0afb84d (diff) | |
download | gcc-6d49a073b49d3f2f467ebf6cc36ec12f8a3ec012.zip gcc-6d49a073b49d3f2f467ebf6cc36ec12f8a3ec012.tar.gz gcc-6d49a073b49d3f2f467ebf6cc36ec12f8a3ec012.tar.bz2 |
Fix powerpc/rs6000 (subreg:SF (mem:SI ...)) reload problem.
* reload.c (push_reload): In WORD_REGISTER_OPERATIONS code, add test
to require the SUBREG mode to be smaller than the SUBREG_REG mode.
* reload1.c (eliminate_regs): Likewise.
From-SVN: r17444
Diffstat (limited to 'gcc/reload1.c')
-rw-r--r-- | gcc/reload1.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/gcc/reload1.c b/gcc/reload1.c index 6de93b9..01263c8 100644 --- a/gcc/reload1.c +++ b/gcc/reload1.c @@ -3122,17 +3122,19 @@ eliminate_regs (x, mem_mode, insn) int new_size = GET_MODE_SIZE (GET_MODE (new)); if (GET_CODE (new) == MEM - && x_size <= new_size + && ((x_size < new_size #ifdef WORD_REGISTER_OPERATIONS - /* On these machines, combine can create rtl of the form - (set (subreg:m1 (reg:m2 R) 0) ...) - where m1 < m2, and expects something interesting to - happen to the entire word. Moreover, it will use the - (reg:m2 R) later, expecting all bits to be preserved. - So if the number of words is the same, preserve the - subreg so that push_reloads can see it. */ - && ! ((x_size-1)/UNITS_PER_WORD == (new_size-1)/UNITS_PER_WORD) + /* On these machines, combine can create rtl of the form + (set (subreg:m1 (reg:m2 R) 0) ...) + where m1 < m2, and expects something interesting to + happen to the entire word. Moreover, it will use the + (reg:m2 R) later, expecting all bits to be preserved. + So if the number of words is the same, preserve the + subreg so that push_reloads can see it. */ + && ! ((x_size-1)/UNITS_PER_WORD == (new_size-1)/UNITS_PER_WORD) #endif + ) + || (x_size == new_size)) #ifdef LOAD_EXTEND_OP /* On these machines we will be reloading what is inside the SUBREG if it originally was a pseudo and |