diff mbox

Fix ira.c RTL sharing bug

Message ID 20161130120254.GP3541@tucnak.redhat.com
State New
Headers show

Commit Message

Jakub Jelinek Nov. 30, 2016, 12:02 p.m. UTC
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.


	Jakub

Comments

Bernd Schmidt Nov. 30, 2016, 12:25 p.m. UTC | #1
On 11/30/2016 01:02 PM, Jakub Jelinek wrote:
> 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.

Ok for both patches.


Bernd
diff mbox

Patch

--- 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)
 	    {