]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
PR rtl-optimization/29599
authorkkojima <kkojima@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 10 Feb 2007 06:47:49 +0000 (06:47 +0000)
committerkkojima <kkojima@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 10 Feb 2007 06:47:49 +0000 (06:47 +0000)
* reload1.c (eliminate_regs_in_insn): Take the destination
mode into account when computing the offset.

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

gcc/ChangeLog
gcc/reload1.c

index 05fac8a48a2c9bceac572f7df008041d55379d39..584726dbebed79c3df2e6af88c2741d3fc1bc9cf 100644 (file)
@@ -1,3 +1,9 @@
+2007-02-10  Kaz Kojima  <kkojima@gcc.gnu.org>
+
+       PR rtl-optimization/29599
+       * reload1.c (eliminate_regs_in_insn): Take the destination
+       mode into account when computing the offset.
+
 2007-02-09  Stuart Hastings  <stuart@apple.com>
        Richard Henderson  <rth@redhat.com>
 
index 5598b7afdba57ab113996a3ad25589dc2b472a10..01e0657a448917cd12a8e6d91ce29c9033df176d 100644 (file)
@@ -1,7 +1,7 @@
 /* Reload pseudo regs into hard regs for insns that require hard regs.
    Copyright (C) 1987, 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
-   1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
-   Inc.
+   1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
+   Free Software Foundation, Inc.
 
 This file is part of GCC.
 
@@ -3100,6 +3100,7 @@ eliminate_regs_in_insn (rtx insn, int replace)
          {
            rtx to_rtx = ep->to_rtx;
            offset += ep->offset;
+           offset = trunc_int_for_mode (offset, GET_MODE (reg));
 
            if (GET_CODE (XEXP (plus_cst_src, 0)) == SUBREG)
              to_rtx = gen_lowpart (GET_MODE (XEXP (plus_cst_src, 0)),