[backport gcc-4.9/trunk r201699 ] List-Archive: Date: Tue, 13 Aug 2013 14:26:59 -0400 From: Vladimir Makarov Subject: patch to fix a typo in ira.c Xingxing Pan found a typo in IRA code. Here is the patch to fix it. The patch was bootstrapped on x86/x86-64. I did not find code generation difference on x86/x86-64, s390, ppc, and arm on variety tests. The code might make some small difference on other targets though. gcc/ 2013-08-13 Vladimir Makarov * ira.c (setup_class_translate_array): Use aclass instead of cl for classes not fully covered by allocno classes. --- gcc-4.7.3/gcc/ira.c.~1~ 2012-02-22 00:27:59.000000000 +0100 +++ gcc-4.7.3/gcc/ira.c 2013-08-17 11:41:29.125551100 +0200 @@ -1090,8 +1090,8 @@ setup_class_translate_array (enum reg_cl min_cost = INT_MAX; for (mode = 0; mode < MAX_MACHINE_MODE; mode++) { - cost = (ira_memory_move_cost[mode][cl][0] - + ira_memory_move_cost[mode][cl][1]); + cost = (ira_memory_move_cost[mode][aclass][0] + + ira_memory_move_cost[mode][aclass][1]); if (min_cost > cost) min_cost = cost; }