Patchwork Handle attribute enabled in reload_cse_regs

login
register
mail settings
Submitter Bernd Schmidt
Date Aug. 2, 2010, 9:44 a.m.
Message ID <4C569367.7060809@codesourcery.com>
Download mbox | patch
Permalink /patch/60527/
State New
Headers show

Comments

Bernd Schmidt - Aug. 2, 2010, 9:44 a.m.
I've committed this to fix a problem where reload_cse_regs wasn't taking
attribute enabled into account when looking at alternatives.

Tested on arm-linux, together with a patch that adds a definition of
attribute enabled to arm.md.


Bernd

Patch

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 162811)
+++ ChangeLog	(working copy)
@@ -1,3 +1,8 @@ 
+2010-08-02  Bernd Schmidt  <bernds@codesourcery.com>
+
+	* postreload.c (reload_cse_simplify_operands): Take attribute enabled
+	into account.
+
 2010-08-02  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
 
 	* config/arm/arm.c (COSTS_N_INSNS): Remove definition.
Index: postreload.c
===================================================================
--- postreload.c	(revision 162782)
+++ postreload.c	(working copy)
@@ -573,6 +573,7 @@  reload_cse_simplify_operands (rtx insn, 
 		     alternative yet and the operand being replaced is not
 		     a cheap CONST_INT.  */
 		  if (op_alt_regno[i][j] == -1
+		      && recog_data.alternative_enabled_p[j]
 		      && reg_fits_class_p (testreg, rclass, 0, mode)
 		      && (!CONST_INT_P (recog_data.operand[i])
 			  || (rtx_cost (recog_data.operand[i], SET,