]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR target/57935 (ICE in rs6000_secondary_reload_inner:15181, type = load)
authorAlan Modra <amodra@gmail.com>
Wed, 26 Feb 2014 21:57:40 +0000 (08:27 +1030)
committerAlan Modra <amodra@gcc.gnu.org>
Wed, 26 Feb 2014 21:57:40 +0000 (08:27 +1030)
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

gcc/ChangeLog
gcc/reload1.c

index 89778888c4e23eb54644d4074923ba5f045075ac..cdc06fb210c52d4fa449d6d8072d5ee6890b9fb8 100644 (file)
@@ -1,3 +1,9 @@
+2014-02-27  Alan Modra  <amodra@gmail.com>
+
+       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.
+
 2014-02-26  Richard Biener  <rguenther@suse.de>
 
        PR bootstrap/60343
index b789ee8f19f309535ef2024f375381edf444dc90..3d735eeeec97ef1d53a335cf5d0e2cc8087f2604 100644 (file)
@@ -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;