summaryrefslogtreecommitdiff
path: root/gcc/reload1.c
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2008-11-21 13:47:05 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2008-11-21 13:47:05 +0000
commit8127c2e977d10ce09ab0e3f7d43bf0ad6b4534fd (patch)
tree535ccfa29f6397740a396ac3fd04c226cb94b85a /gcc/reload1.c
parenta5095f658307b9a28644862f860fb4ecfe4a69b3 (diff)
downloadgcc-8127c2e977d10ce09ab0e3f7d43bf0ad6b4534fd.tar.gz
PR target/38208
* reload1.c (eliminate_regs_in_insn): For trunc_int_for_mode use mode of PLUS, not mode of the eliminated register. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@142088 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/reload1.c')
-rw-r--r--gcc/reload1.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/reload1.c b/gcc/reload1.c
index 76175e3ecf3..e9ac1486915 100644
--- a/gcc/reload1.c
+++ b/gcc/reload1.c
@@ -1,6 +1,6 @@
/* 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, 2007
+ 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
Free Software Foundation, Inc.
This file is part of GCC.
@@ -3299,7 +3299,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));
+ offset = trunc_int_for_mode (offset, GET_MODE (plus_cst_src));
if (GET_CODE (XEXP (plus_cst_src, 0)) == SUBREG)
to_rtx = gen_lowpart (GET_MODE (XEXP (plus_cst_src, 0)),