OSDN Git Service

* regmove.c (regmove_optimize): Use lowpart_subreg instead of
authoruweigand <uweigand@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 16 Nov 2004 21:11:33 +0000 (21:11 +0000)
committeruweigand <uweigand@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 16 Nov 2004 21:11:33 +0000 (21:11 +0000)
gen_rtx_SUBREG with incorrect offset to compute SRC_SUBREG.

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

gcc/ChangeLog
gcc/regmove.c

index 1ed68cb..72729f4 100644 (file)
@@ -1,3 +1,8 @@
+2004-11-16  Ulrich Weigand  <uweigand@de.ibm.com>
+
+       * regmove.c (regmove_optimize): Use lowpart_subreg instead of
+       gen_rtx_SUBREG with incorrect offset to compute SRC_SUBREG.
+
 2004-11-16  Devang Patel  <dpatel@apple.com>
 
        * tree-if-conv.c (clean_predicate_lists): Update gcc_assert check.
index 7f54559..4876111 100644 (file)
@@ -1150,10 +1150,11 @@ regmove_optimize (rtx f, int nregs, FILE *regmove_dump_file)
                  && GET_MODE_SIZE (GET_MODE (dst))
                     >= GET_MODE_SIZE (GET_MODE (SUBREG_REG (dst))))
                {
-                 src_subreg
-                   = gen_rtx_SUBREG (GET_MODE (SUBREG_REG (dst)),
-                                     src, SUBREG_BYTE (dst));
                  dst = SUBREG_REG (dst);
+                 src_subreg = lowpart_subreg (GET_MODE (dst),
+                                              src, GET_MODE (src));
+                 if (!src_subreg)
+                   continue;
                }
              if (!REG_P (dst)
                  || REGNO (dst) < FIRST_PSEUDO_REGISTER)