This is the mail archive of the
mailing list for the GCC project.
[4.2 PATCH] fix pr32004 fallout on sh and ia64
- From: Paolo Bonzini <paolo dot bonzini at lu dot unisi dot ch>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>, Mark Mitchell <mark at codesourcery dot com>, Eric Botcazou <ebotcazou at libertysurf dot fr>
- Date: Sat, 14 Jul 2007 15:25:25 +0200
- Subject: [4.2 PATCH] fix pr32004 fallout on sh and ia64
- Reply-to: bonzini at gnu dot org
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
If you prefer, I'm open to reverting the patch and reapplying it after
2007-07-13 Paolo Bonzini <firstname.lastname@example.org>
* function.c (match_asm_constraints_1): Skip MEM outputs.
(rest_of_match_asm_constraints): Call allocate_reg_life_data.
--- 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))
@@ -5712,8 +5716,9 @@ rest_of_match_asm_constraints (void)
+ allocate_reg_life_data ();
PROP_DEATH_NOTES | PROP_REG_INFO);