When finding soft conflict in IRA, we wrongly use conflict allocno mode.
This can result in more shuffling on the region borders and worse code
generation. The patch fixes this.
gcc/ChangeLog:
* ira-color.cc (assign_hard_reg): Use the right allocno mode to
call note_conflict.
full_costs[hri] += cost;
}
};
+ enum machine_mode a_mode = ALLOCNO_MODE (a);
for (int r = hard_regno;
- r >= 0 && (int) end_hard_regno (mode, r) > hard_regno;
+ r >= 0 && (int) end_hard_regno (a_mode, r) > hard_regno;
r--)
note_conflict (r);
for (int r = hard_regno + 1;