This is the mail archive of the 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]

[vtab and trunk] fix gcse for insn before note at end of BB

If an insn is followed by notes before the end of a basic block, gcse
will refrain from inserting the sets in it into the hash table.
There's no reason to do that.  I believe it was just a logic mistake,
that may have never hit before.

Bootstrapped on x86_64-linux-gnu.  Ok to install?

Index: gcc/ChangeLog
from  Alexandre Oliva  <>

	* gcse.c (hash_scan_set): Insert set in insn before note at
	the end of basic block.

Index: gcc/gcse.c
--- gcc/gcse.c.orig	2007-08-23 08:26:43.000000000 -0300
+++ gcc/gcse.c	2007-08-23 08:26:48.000000000 -0300
@@ -1760,8 +1760,8 @@ hash_scan_set (rtx pat, rtx insn, struct
 		  modified.  Here we want to search from INSN+1 on, but
 		  oprs_available_p searches from INSN on.  */
 	       && (insn == BB_END (BLOCK_FOR_INSN (insn))
-		   || ((tmp = next_nonnote_insn (insn)) != NULL_RTX
-		       && oprs_available_p (pat, tmp))))
+		   || (tmp = next_nonnote_insn (insn)) == NULL_RTX
+		   || oprs_available_p (pat, tmp)))
 	insert_set_in_table (pat, insn, table);
   /* In case of store we want to consider the memory value as available in
Alexandre Oliva
FSF Latin America Board Member
Red Hat Compiler Engineer   aoliva@{,}
Free Software Evangelist  oliva@{,}

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