PR rtl-optimization/49154
authorhp <hp@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 9 Jun 2011 23:38:35 +0000 (23:38 +0000)
committerhp <hp@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 9 Jun 2011 23:38:35 +0000 (23:38 +0000)
* ira-costs.c (setup_regno_cost_classes_by_mode): If there
already is a matching slot in the hashtable, assign it to
classes_ptr.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@174868 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/ira-costs.c

index f05ecfd..cd42b1a 100644 (file)
@@ -1,6 +1,11 @@
 2011-06-10  Hans-Peter Nilsson  <hp@axis.com>
 
        PR rtl-optimization/49154
+       * ira-costs.c (setup_regno_cost_classes_by_mode): If there
+       already is a matching slot in the hashtable, assign it to
+       classes_ptr.
+
+       PR rtl-optimization/49154
        * doc/tm.texi.in (Register Classes): Document rule for the narrowest
        register classes.
        * doc/tm.texi: Regenerate.
index f517386..a22bb15 100644 (file)
@@ -299,6 +299,8 @@ setup_regno_cost_classes_by_mode (int regno, enum machine_mode mode)
          classes_ptr = setup_cost_classes (&classes);
          *slot = classes_ptr;
        }
+      else
+       classes_ptr = *slot;
       cost_classes_mode_cache[mode] = (cost_classes_t) *slot;
     }
   regno_cost_classes[regno] = classes_ptr;