This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Fix gcse.c hash_scan_set more
- From: Richard Guenther <rguenther at suse dot de>
- To: gcc-patches at gcc dot gnu dot org
- Date: Thu, 11 Oct 2007 11:45:56 +0200 (CEST)
- Subject: [PATCH] Fix gcse.c hash_scan_set more
This fixes hash_scan_set of gcse.c more as, as Steven noticed, we use
next_nonnote_insn and that may run into a different basic block. In
that case we can just insert the set into the table.
Bootstrapped and tested on x86_64-unknown-linux-gnu, applied to mainline.
Richard.
2007-10-11 Richard Guenther <rguenther@suse.de>
* gcse.c (hash_scan_set): If the next nonnote insn is in
a different basic block insert the set.
Index: gcse.c
===================================================================
--- gcse.c (revision 129226)
+++ gcse.c (working copy)
@@ -1761,6 +1761,7 @@ hash_scan_set (rtx pat, rtx insn, struct
oprs_available_p searches from INSN on. */
&& (insn == BB_END (BLOCK_FOR_INSN (insn))
|| (tmp = next_nonnote_insn (insn)) == NULL_RTX
+ || BLOCK_FOR_INSN (tmp) != BLOCK_FOR_INSN (insn)
|| oprs_available_p (pat, tmp)))
insert_set_in_table (pat, insn, table);
}