[alpha] : Fix PR target/50001, ICE in reload_combine_note_use, at postreload.c:1538

Submitted by Uros Bizjak on Aug. 6, 2011, 6:37 p.m.


Message ID CAFULd4YNLvygJeSm=SiTMSOhaGjNYTMqEehhKOv9bKRUMcUTig@mail.gmail.com
State New
Headers show

Commit Message

Uros Bizjak Aug. 6, 2011, 6:37 p.m.

The problem was that exception_receiver pattern recorded a stack slot
that referred to virtual-stack-vars. Recent changes moved generation
of exception landing pads after virtuals were instantiated, so in
bbpart pass we emitted:

(insn 262 266 263 51 (unspec_volatile [
            (mem/c:DI (plus:DI (reg/f:DI 65 virtual-stack-vars)
                    (const_int 16 [0x10])) [0 S8 A64])
        ] UNSPECV_EHR) 278 {*exception_receiver_2}

Later passes choked on uninstantiated register.

Attached patch defines TARGET_INSTANTIATE_DECLS to also instantiate
registers in saved stack slot address.

2011-08-06  Uros Bizjak  <ubizjak@gmail.com>

	PR target/50001
	* config/alpha/alpha.c (alpha_instantiate_decls): New function.

Patch was bootstrapped and regtested on alphaev68-pc-linux-gnu, where
fixes g++.dg/tree-prof/partition1.C ICEs in the testsuite.

Patch was committed to SVN mainline, will be also committed to release branches.


Patch hide | download patch | download mbox

Index: alpha.c
--- alpha.c	(revision 177507)
+++ alpha.c	(working copy)
@@ -4632,6 +4632,13 @@  alpha_gp_save_rtx (void)
   return m;
+static void
+alpha_instantiate_decls (void)
+  if (cfun->machine->gp_save_rtx != NULL_RTX)
+    instantiate_decl_rtl (cfun->machine->gp_save_rtx);
 static int
 alpha_ra_ever_killed (void)
@@ -9811,6 +9818,9 @@  alpha_conditional_register_usage (void)
 #define TARGET_TRAMPOLINE_INIT alpha_trampoline_init
+#define TARGET_INSTANTIATE_DECLS alpha_instantiate_decls
 #define TARGET_SECONDARY_RELOAD alpha_secondary_reload