This is the mail archive of the gcc-patches@gcc.gnu.org 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]

Fix alignment propagation


Hi,
this patch fixes alignment propagation that causes wrong code on solex and firefox.
Patch is by Martin, I just added the obvous MINUS_EXPR fix (the offset would be wrong,
but I see no reason for MINUX_ExPR appearing there with constant parameter), went
ahead and commited the fix.

Tested on x86_64-linux.

Honza

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 220825)
+++ ChangeLog	(working copy)
@@ -1,3 +1,10 @@
+2015-02-19  Martin Jambor  <mjmabor@suse.cz>
+	    Jan Hubicka  <hubicka@ucw.cz>
+
+	PR ipa/65028
+	* ipa-cp.c (propagate_alignment_accross_jump_function): Fix propagation
+	across jump functions.
+
 2015-02-19  Uros Bizjak  <ubizjak@gmail.com>
 
 	* config/alpha/alpha.c (alpha_in_small_data_p): Reject common symbols.
Index: ipa-cp.c
===================================================================
--- ipa-cp.c	(revision 220825)
+++ ipa-cp.c	(working copy)
@@ -1438,8 +1438,7 @@ propagate_alignment_accross_jump_functio
 	  if (op != NOP_EXPR)
 	    {
 	      if (op != POINTER_PLUS_EXPR
-		  && op != PLUS_EXPR
-		  && op != MINUS_EXPR)
+		  && op != PLUS_EXPR)
 		goto prop_fail;
 	      tree operand = ipa_get_jf_pass_through_operand (jfunc);
 	      if (!tree_fits_shwi_p (operand))
@@ -1451,7 +1450,7 @@ propagate_alignment_accross_jump_functio
       else
 	{
 	  src_idx = ipa_get_jf_ancestor_formal_id (jfunc);
-	  offset = ipa_get_jf_ancestor_offset (jfunc);
+	  offset = ipa_get_jf_ancestor_offset (jfunc) / BITS_PER_UNIT;;
 	}
 
       src_lats = ipa_get_parm_lattices (caller_info, src_idx);


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