[PATCH] Fix ira.c RTL sharing bug
Jakub Jelinek
jakub@redhat.com
Wed Nov 30 12:03:00 GMT 2016
Hi!
I've discovered today that RTL sharing verification has been disabled for
the last 3.5 years. My --enable-checking=yes,rtl,extra bootstraps on
x86_64-linux and i686-linux revealed only two bugs.
Here is a fix for one of them, x can be shared with another insn that has
it in REG_EQUIV already, so we need to unshare it.
Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?
2016-11-30 Jakub Jelinek <jakub@redhat.com>
* ira.c (ira_update_equiv_info_by_shuffle_insn): Use copy_rtx
for REG_EQUIV argument.
--- gcc/ira.c.jj 2016-11-18 18:11:24.000000000 +0100
+++ gcc/ira.c 2016-11-30 10:53:48.061704159 +0100
@@ -2647,7 +2647,7 @@ ira_update_equiv_info_by_shuffle_insn (i
}
if (find_reg_note (insn, REG_EQUIV, x) == NULL_RTX)
{
- note = set_unique_reg_note (insn, REG_EQUIV, x);
+ note = set_unique_reg_note (insn, REG_EQUIV, copy_rtx (x));
gcc_assert (note != NULL_RTX);
if (internal_flag_ira_verbose > 3 && ira_dump_file != NULL)
{
Jakub
More information about the Gcc-patches
mailing list