re PR middle-end/24750 (global-alloc (reload) trips over own confusion for unexpected...
authorHans-Peter Nilsson <hp@axis.com>
Fri, 11 Nov 2005 23:17:16 +0000 (23:17 +0000)
committerHans-Peter Nilsson <hp@gcc.gnu.org>
Fri, 11 Nov 2005 23:17:16 +0000 (23:17 +0000)
PR middle-end/24750
* reload.c (find_reloads_address_1) <case TRUNCATE, SIGN_EXTEND,
ZERO_EXTEND>: New cases.

From-SVN: r106804

gcc/ChangeLog
gcc/reload.c

index 6742b1463283afbf0ad40ee88afac02b65dc3baa..bb8033c782befece611e7f72d06ba4e762cf3304 100644 (file)
@@ -1,3 +1,9 @@
+2005-11-12  Hans-Peter Nilsson  <hp@axis.com>
+
+       PR middle-end/24750
+       * reload.c (find_reloads_address_1) <case TRUNCATE, SIGN_EXTEND,
+       ZERO_EXTEND>: New cases.
+
 2005-11-11  Daniel Jacobowitz  <dan@codesourcery.com>
 
        * longlong.h (__clz_tab): Always provide.
index e55bf34c436caedb54a61c8d94db6126f5bc9606..0503f5a2eef0da242c32b56284a06aad4e4ad11b 100644 (file)
@@ -5695,6 +5695,24 @@ find_reloads_address_1 (enum machine_mode mode, rtx x, int context,
        }
       return 0;
 
+    case TRUNCATE:
+    case SIGN_EXTEND:
+    case ZERO_EXTEND:
+      /* Look for parts to reload in the inner expression and reload them
+        too, in addition to this operation.  Reloading all inner parts in
+        addition to this one shouldn't be necessary, but at this point,
+        we don't know if we can possibly omit any part that *can* be
+        reloaded.  Targets that are better off reloading just either part
+        (or perhaps even a different part of an outer expression), should
+        define LEGITIMIZE_RELOAD_ADDRESS.  */
+      find_reloads_address_1 (GET_MODE (XEXP (x, 0)), XEXP (x, 0),
+                             context, &XEXP (x, 0), opnum,
+                             type, ind_levels, insn);
+      push_reload (x, NULL_RTX, loc, (rtx*) 0,
+                  context_reg_class,
+                  GET_MODE (x), VOIDmode, 0, 0, opnum, type);
+      return 1;
+
     case MEM:
       /* This is probably the result of a substitution, by eliminate_regs, of
         an equivalent address for a pseudo that was not allocated to a hard