diff options
author | Roger Sayle <roger@eyesopen.com> | 2003-03-06 21:59:09 +0000 |
---|---|---|
committer | Roger Sayle <sayle@gcc.gnu.org> | 2003-03-06 21:59:09 +0000 |
commit | 37f5242b58f51568fcb60fd2fb35ca61c92b2305 (patch) | |
tree | 6bea9563d43f884a77740f8e6d1c9a0c2f2ed73c /gcc/emit-rtl.c | |
parent | 0768112136c5c5e20ee580d61a2923b64995ba77 (diff) | |
download | gcc-37f5242b58f51568fcb60fd2fb35ca61c92b2305.zip gcc-37f5242b58f51568fcb60fd2fb35ca61c92b2305.tar.gz gcc-37f5242b58f51568fcb60fd2fb35ca61c92b2305.tar.bz2 |
emit-rtl.c (gen_lowpart): When requesting the low-part of a MEM...
* emit-rtl.c (gen_lowpart): When requesting the low-part of a
MEM, try loading the MEM into a register and taking the low-part
of that, to help CSE see the use of the MEM in its true mode.
From-SVN: r63907
Diffstat (limited to 'gcc/emit-rtl.c')
-rw-r--r-- | gcc/emit-rtl.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c index dbc0a37..c96bc4e 100644 --- a/gcc/emit-rtl.c +++ b/gcc/emit-rtl.c @@ -1371,6 +1371,12 @@ gen_lowpart (mode, x) { /* The only additional case we can do is MEM. */ int offset = 0; + + /* The following exposes the use of "x" to CSE. */ + if (GET_MODE_SIZE (GET_MODE (x)) <= UNITS_PER_WORD + && ! no_new_pseudos) + return gen_lowpart (mode, force_reg (GET_MODE (x), x)); + if (WORDS_BIG_ENDIAN) offset = (MAX (GET_MODE_SIZE (GET_MODE (x)), UNITS_PER_WORD) - MAX (GET_MODE_SIZE (mode), UNITS_PER_WORD)); |