diff mbox

Emit more REG_EQUIV notes for function args (PR42235)

Message ID 4C477A1A.8040604@codesourcery.com
State New
Headers show

Commit Message

Bernd Schmidt July 21, 2010, 10:52 p.m. UTC
Here's a different patch, which I've committed as obvious after
bootstrapping and testing i686 and x64_64-linux.  It just restricts the
previous change to situations where it's clearly safe.


Bernd
diff mbox

Patch

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 162390)
+++ ChangeLog	(working copy)
@@ -18,6 +18,10 @@ 
 	an old insn, ignore a use that occurs after store_ruid.
 	* Makefile.in (postreload.o): Update dependencies.
 
+	* function.c (record_hard_reg_sets): Restrict the previous change
+	to cases where the incoming nominal mode is the same as the
+	incoming promoted mode and everything happens in MODE_INT.
+
 2010-07-21  Jakub Jelinek  <jakub@redhat.com>
 
 	PR debug/45015
Index: function.c
===================================================================
--- function.c	(revision 162372)
+++ function.c	(working copy)
@@ -2918,7 +2918,10 @@  assign_parm_setup_reg (struct assign_par
 		     || promoted_nominal_mode != data->promoted_mode);
   moved = false;
 
-  if (need_conversion)
+  if (need_conversion
+      && GET_MODE_CLASS (data->nominal_mode) == MODE_INT
+      && data->nominal_mode == data->passed_mode
+      && data->nominal_mode == GET_MODE (data->entry_parm))
     {
       /* ENTRY_PARM has been converted to PROMOTED_MODE, its
 	 mode, by the caller.  We now have to convert it to
@@ -2979,8 +2982,9 @@  assign_parm_setup_reg (struct assign_par
 	  if (moved)
 	    {
 	      emit_insn (insns);
-	      equiv_stack_parm = gen_rtx_fmt_e (code, GET_MODE (parmreg),
-						equiv_stack_parm);
+	      if (equiv_stack_parm != NULL_RTX)
+		equiv_stack_parm = gen_rtx_fmt_e (code, GET_MODE (parmreg),
+						  equiv_stack_parm);
 	    }
 	}
     }