This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[4.2 PATCH] fix pr32004 fallout on sh and ia64

Kaz pointed me to two cases where the match_asm_constraints pass causes ICEs on sh and ia64.

The first one, in asm4.c, is caused by the new code trying to emit a mem-to-mem move and, due to no_new_pseudos, it fails. In general, emitting a store to avoid a reload is not brilliant, so I'm disabling the code for this case and leaving it to reload to fix the problems. This one I would like to put in 4.3 too as a heuristic.

The second one is caused by allocate_reg_life_data not being called before update_life_info_in_dirty_blocks.

If you prefer, I'm open to reverting the patch and reapplying it after 4.2.1.

2007-07-13  Paolo Bonzini  <>

	* function.c (match_asm_constraints_1): Skip MEM outputs.
	(rest_of_match_asm_constraints): Call allocate_reg_life_data.

Index: function.c
--- function.c	(revision 126487)
+++ function.c	(working copy)
@@ -5668,7 +5668,11 @@ match_asm_constraints_1 (rtx insn, rtx *
       input = RTVEC_ELT (inputs, i);
       if (rtx_equal_p (output, input)
 	  || (GET_MODE (input) != VOIDmode
-	      && GET_MODE (input) != GET_MODE (output)))
+	      && GET_MODE (input) != GET_MODE (output))
+	  /* It is not going to improve things if we copy the
+	     input operand to memory.  */
+	  || MEM_P (output))
       start_sequence ();
@@ -5712,8 +5716,9 @@ rest_of_match_asm_constraints (void)
+  allocate_reg_life_data ();
   update_life_info_in_dirty_blocks (UPDATE_LIFE_GLOBAL_RM_NOTES,
                                     PROP_DEATH_NOTES | PROP_REG_INFO);
   return 0;

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]