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]

[patch] PR33667, invalid rtx sharing


Hi,

lower-subreg doesn't update the match_dups correctly.  Before reload they 
need to be kept unshared, hence validate_change can't be used.  We could 
use either copy_rtx or validate_unshare_change, of which I chose the 
latter.

Fixes the bug, I've put it to bootstrapping and regtesting.  Okay for 
trunk?

I'll include the testcase from the bugreport as gcc.dg/pr33667.c .


Ciao,
Michael.
	* lower-subreg.c (decompose_multiword_subregs): Use 
	validate_unshare_change().

Index: gcc/lower-subreg.c
===================================================================
--- gcc/lower-subreg.c	(revision 129030)
+++ gcc/lower-subreg.c	(working copy)
@@ -1339,7 +1339,7 @@ decompose_multiword_subregs (void)
 			  int dup_num = recog_data.dup_num[i];
 			  rtx *px = recog_data.operand_loc[dup_num];
 
-			  validate_change (insn, pl, *px, 1);
+			  validate_unshare_change (insn, pl, *px, 1);
 			}
 
 		      i = apply_change_group ();


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