Patchwork patch to solve PR48381

login
register
mail settings
Submitter Vladimir Makarov
Date March 31, 2011, 7:13 p.m.
Message ID <4D94D249.6020908@redhat.com>
Download mbox | patch
Permalink /patch/89118/
State New
Headers show

Comments

Vladimir Makarov - March 31, 2011, 7:13 p.m.
The following patch solves the PR48381.  The reason for the problem is 
described on

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48381

Ok to commit?  It was successfully bootstrapped on x86-64.

2011-03-31  Vladimir Makarov <vmakarov@redhat.com>

         PR rtl-optimization/48381
         * ira-color.c (assign_hard_reg): Use hard reg set intersection
         instead of ira_class_hard_reg_index for calculating conflicting
         hard registers.
Jeff Law - March 31, 2011, 7:19 p.m.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 03/31/11 13:13, Vladimir Makarov wrote:
> The following patch solves the PR48381.  The reason for the problem is
> described on
> 
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48381
> 
> Ok to commit?  It was successfully bootstrapped on x86-64.
> 
> 2011-03-31  Vladimir Makarov <vmakarov@redhat.com>
> 
>         PR rtl-optimization/48381
>         * ira-color.c (assign_hard_reg): Use hard reg set intersection
>         instead of ira_class_hard_reg_index for calculating conflicting
>         hard registers.
OK.
jeff

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJNlNOmAAoJEBRtltQi2kC7s5MH/0iiyPuBtEvdsUxBXbgzTreW
HNa+Fl3vYjZRFkM1Rv/Z/Z4m4yuQLLA6IdPBKNB3mBLeSXoNwPGRfYlhFpB2QkFF
nBnzptyrK8QXc/iV/q8WK9SYy5Sd4947SMo3+F3U5qWw7WT3Cd0IM5gzQ+P7EjGm
ohCTTtwlki2LxXh9yIJd4q6RCvtCtH3YoC/maqtJM55jcQd+JAn8GaSKQhqPKV4U
8as8gItCQ4KxF+auU1Uhx2EEb+oqOBpdbSGSINjnV3FnSSg0NoMwQHJ5DOnikxHF
GaDfCqT4f8aKo41/NhK/bm3RR0DCcoo5NLeL4Vbw5pjM3OVK2auLVV2wXMSVT7Q=
=mx4T
-----END PGP SIGNATURE-----

Patch

Index: ira-color.c
===================================================================
--- ira-color.c	(revision 171769)
+++ ira-color.c	(working copy)
@@ -1620,7 +1620,9 @@  assign_hard_reg (ira_allocno_t a, bool r
 	    {
 	      hard_regno = ALLOCNO_HARD_REGNO (conflict_a);
 	      if (hard_regno >= 0
-		  && ira_class_hard_reg_index[aclass][hard_regno] >= 0)
+		  && (ira_hard_reg_set_intersection_p
+		      (hard_regno, ALLOCNO_MODE (conflict_a),
+		       reg_class_contents[aclass])))
 		{
 		  int n_objects = ALLOCNO_NUM_OBJECTS (conflict_a);
 		  int conflict_nregs;