regmove.c (regmove_optimize): Don't replace a reg with another reg of a different...
authorKazu Hirata <kazu@hxi.com>
Thu, 26 Jul 2001 15:23:07 +0000 (15:23 +0000)
committerKazu Hirata <kazu@gcc.gnu.org>
Thu, 26 Jul 2001 15:23:07 +0000 (15:23 +0000)
* regmove.c (regmove_optimize): Don't replace a reg with
another reg of a different mode.

From-SVN: r44399

gcc/ChangeLog
gcc/regmove.c

index 8bc8788..431fcff 100644 (file)
@@ -1,3 +1,8 @@
+2001-07-26  Kazu Hirata  <kazu@hxi.com>
+
+       * regmove.c (regmove_optimize): Don't replace a reg with
+       another reg of a different mode.
+
 2001-07-26  Andrew MacLeod  <amacleod@redhat.com>
 
        * params.def (PARAM_MAX_PENDING_LIST_LENGTH): Add parameter to 
index 7e49143..587acea 100644 (file)
@@ -1244,6 +1244,9 @@ regmove_optimize (f, nregs, regmove_dump_file)
              if (! regclass_compatible_p (src_class, dst_class))
                continue;
 
+             if (GET_MODE (src) != GET_MODE (dst))
+               continue;
+
              if (fixup_match_1 (insn, set, src, src_subreg, dst, pass,
                                 op_no, match_no,
                                 regmove_dump_file))