+2013-09-18 Vladimir Makarov <vmakarov@redhat.com>
+
+ PR rtl-optimization/58438
+ * lra.c (lra): Clear lra_optional_reload_pseudos in upper loop.
+ * lra-constraints.c (undo_optional_reloads): Keep optional reloads
+ from previous subpasses.
+
2013-09-18 Richard Earnshaw <rearnsha@arm.com>
* arm.c (arm_get_frame_offsets): Validate architecture supports
EXECUTE_IF_SET_IN_BITMAP (&lra_optional_reload_pseudos, 0, regno, bi)
{
keep_p = false;
- if (reg_renumber[lra_reg_info[regno].restore_regno] >= 0)
- /* If the original pseudo changed its allocation, just
- removing the optional pseudo is dangerous as the original
- pseudo will have longer live range. */
+ /* Keep optional reloads from previous subpasses. */
+ if (lra_reg_info[regno].restore_regno < 0
+ /* If the original pseudo changed its allocation, just
+ removing the optional pseudo is dangerous as the original
+ pseudo will have longer live range. */
+ || reg_renumber[lra_reg_info[regno].restore_regno] >= 0)
keep_p = true;
else if (reg_renumber[regno] >= 0)
EXECUTE_IF_SET_IN_BITMAP (&lra_reg_info[regno].insn_bitmap, 0, uid, bi2)
{
for (;;)
{
- bitmap_clear (&lra_optional_reload_pseudos);
/* We should try to assign hard registers to scratches even
if there were no RTL transformations in
lra_constraints. */
lra_clear_live_ranges ();
}
}
+ /* Don't clear optional reloads bitmap until all constraints are
+ satisfied as we need to differ them from regular reloads. */
+ bitmap_clear (&lra_optional_reload_pseudos);
bitmap_clear (&lra_subreg_reload_pseudos);
bitmap_clear (&lra_inheritance_pseudos);
bitmap_clear (&lra_split_regs);
+2013-09-18 Vladimir Makarov <vmakarov@redhat.com>
+
+ PR rtl-optimization/58438
+ * g++.dg/pr58438.C: New test.
+
2013-09-18 Tobias Burnus <burnus@net-b.de>
PR fortran/43366