emit-rtl.c (gen_lowpart): Don't force MEMs into a register unless the register lowpar...
authorRichard Sandiford <rsandifo@redhat.com>
Wed, 19 Nov 2003 08:23:43 +0000 (08:23 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Wed, 19 Nov 2003 08:23:43 +0000 (08:23 +0000)
* emit-rtl.c (gen_lowpart): Don't force MEMs into a register unless
the register lowpart is a TRULY_NOOP_TRUNCATION.

From-SVN: r73731

gcc/ChangeLog
gcc/emit-rtl.c

index 931f74c2aeb83f2541cafd4ca1cb61ad1fe78897..9c1b245aee8c2e82d0edc5c36972b8cf41b1a7ce 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 9c50e2371fd6d78f9012423153bdf9eaa9e61fd0..a528641a6f988886bdb37271d86a8685a44de62f 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));