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] Fix PR rtl-optimization/32557 dataflow RTL checking ICE


   This patch fixes building GCC for sh-unknown-elf with
--enable-checking=yes,rtl and tests with no regression. I also bootstrapped
and tested the patch on x86_64-unknown-linux-gnu with no regressions.

   REG_DEAD and REG_UNUSED notes are expected to contain plain REGs, not
SUBREGs. This patch fixes a known offender. Not adding the notes should at
worst disable some dead code removal. Ok for trunk?

:ADDPATCH dataflow:

2007-08-19  Rask Ingemann Lambertsen  <rask@sygehus.dk>

	PR rtl-optimization/32557
	* df-problems.c (df_note_bb_compute): Only add REG_DEAD and
	  REG_UNUSED notes for registers.

Index: gcc/df-problems.c
===================================================================
--- gcc/df-problems.c	(revision 127373)
+++ gcc/df-problems.c	(working copy)
@@ -3425,6 +3425,7 @@ df_note_bb_compute (unsigned int bb_inde
 	    {
 	      struct df_mw_hardreg *mws = *mws_rec; 
 	      if ((mws->type == DF_REF_REG_DEF) 
+		  && REG_P (mws->mw_reg)
 		  && !df_ignore_stack_reg (REGNO (mws->mw_reg)))
 		old_unused_notes 
 		  = df_set_unused_notes_for_mw (insn, old_unused_notes, 
@@ -3488,6 +3489,7 @@ df_note_bb_compute (unsigned int bb_inde
 	{
 	  struct df_mw_hardreg *mws = *mws_rec; 
 	  if ((mws->type != DF_REF_REG_DEF)  
+	      && REG_P (mws->mw_reg)
 	      && !df_ignore_stack_reg (REGNO (mws->mw_reg)))
 	    old_dead_notes
 	      = df_set_dead_notes_for_mw (insn, old_dead_notes, 

-- 
Rask Ingemann Lambertsen


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