OSDN Git Service

* emit-rtl.c (gen_lowpart): Don't force MEMs into a register unless
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 19 Nov 2003 08:23:43 +0000 (08:23 +0000)
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 19 Nov 2003 08:23:43 +0000 (08:23 +0000)
the register lowpart is a TRULY_NOOP_TRUNCATION.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@73731 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/emit-rtl.c

index 931f74c..9c1b245 100644 (file)
@@ -1,3 +1,8 @@
+2003-11-19  Richard SAndiford  <rsandifo@redhat.com>
+
+       * emit-rtl.c (gen_lowpart): Don't force MEMs into a register unless
+       the register lowpart is a TRULY_NOOP_TRUNCATION.
+
 2003-11-19  Richard Henderson  <rth@redhat.com>
 
        * config/i386/i386.c (print_reg): Handle QI and HI modes for
index 9c50e23..a528641 100644 (file)
@@ -1356,6 +1356,8 @@ gen_lowpart (enum machine_mode mode, rtx x)
       /* The following exposes the use of "x" to CSE.  */
       if (GET_MODE_SIZE (GET_MODE (x)) <= UNITS_PER_WORD
          && SCALAR_INT_MODE_P (GET_MODE (x))
+         && TRULY_NOOP_TRUNCATION (GET_MODE_BITSIZE (mode),
+                                   GET_MODE_BITSIZE (GET_MODE (x)))
          && ! no_new_pseudos)
        return gen_lowpart (mode, force_reg (GET_MODE (x), x));