Commit 37f5242b by Roger Sayle Committed by Roger Sayle

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
parent 07681121
2003-03-06 Roger Sayle <roger@eyesopen.com>
* 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.
2002-03-05 Tom Tromey <tromey@redhat.com> 2002-03-05 Tom Tromey <tromey@redhat.com>
* config/stormy16/stormy16.h (DWARF_LINE_MIN_INSTR_LENGTH): * config/stormy16/stormy16.h (DWARF_LINE_MIN_INSTR_LENGTH):
......
...@@ -1371,6 +1371,12 @@ gen_lowpart (mode, x) ...@@ -1371,6 +1371,12 @@ gen_lowpart (mode, x)
{ {
/* The only additional case we can do is MEM. */ /* The only additional case we can do is MEM. */
int offset = 0; 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) if (WORDS_BIG_ENDIAN)
offset = (MAX (GET_MODE_SIZE (GET_MODE (x)), UNITS_PER_WORD) offset = (MAX (GET_MODE_SIZE (GET_MODE (x)), UNITS_PER_WORD)
- MAX (GET_MODE_SIZE (mode), UNITS_PER_WORD)); - MAX (GET_MODE_SIZE (mode), UNITS_PER_WORD));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment