aboutsummaryrefslogtreecommitdiff
path: root/gcc/reload1.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2014-02-27 08:27:40 +1030
committerAlan Modra <amodra@gcc.gnu.org>2014-02-27 08:27:40 +1030
commit3157b8795f728659e6c5e55e474a12d101049829 (patch)
treed235d5154c69d5e4760918b48e86aa3efb258389 /gcc/reload1.c
parent4be3d4fa5296e4c13116f62100dd831f4d5dada0 (diff)
downloadgcc-3157b8795f728659e6c5e55e474a12d101049829.zip
gcc-3157b8795f728659e6c5e55e474a12d101049829.tar.gz
gcc-3157b8795f728659e6c5e55e474a12d101049829.tar.bz2
re PR target/57935 (ICE in rs6000_secondary_reload_inner:15181, type = load)
PR target/57935 * reload1.c (emit_input_reload_insns): When reload_override_in, set old to rl->in_reg when rl->in_reg is a subreg. From-SVN: r208186
Diffstat (limited to 'gcc/reload1.c')
-rw-r--r--gcc/reload1.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/gcc/reload1.c b/gcc/reload1.c
index b789ee8..3d735ee 100644
--- a/gcc/reload1.c
+++ b/gcc/reload1.c
@@ -7238,9 +7238,12 @@ emit_input_reload_insns (struct insn_chain *chain, struct reload *rl,
/* delete_output_reload is only invoked properly if old contains
the original pseudo register. Since this is replaced with a
hard reg when RELOAD_OVERRIDE_IN is set, see if we can
- find the pseudo in RELOAD_IN_REG. */
+ find the pseudo in RELOAD_IN_REG. This is also used to
+ determine whether a secondary reload is needed. */
if (reload_override_in[j]
- && REG_P (rl->in_reg))
+ && (REG_P (rl->in_reg)
+ || (GET_CODE (rl->in_reg) == SUBREG
+ && REG_P (SUBREG_REG (rl->in_reg)))))
{
oldequiv = old;
old = rl->in_reg;