bitmap_initialize (&all_spilled_pseudos, ®_obstack);
create_live_range_start_chains ();
setup_live_pseudos_and_spill_after_risky_transforms (&all_spilled_pseudos);
- if (! lra_asm_error_p && flag_checking)
- /* Check correctness of allocation for call-crossed pseudos but
- only when there are no asm errors as in the case of errors the
- asm is removed and it can result in incorrect allocation. */
+ if (! lra_hard_reg_split_p && ! lra_asm_error_p && flag_checking)
+ /* Check correctness of allocation but only when there are no hard reg
+ splits and asm errors as in the case of errors explicit insns involving
+ hard regs are added or the asm is removed and this can result in
+ incorrect allocation. */
for (i = FIRST_PSEUDO_REGISTER; i < max_regno; i++)
if (lra_reg_info[i].nrefs != 0
&& reg_renumber[i] >= 0
extern FILE *lra_dump_file;
+extern bool lra_hard_reg_split_p;
extern bool lra_asm_error_p;
extern bool lra_reg_spill_p;
/* File used for output of LRA debug information. */
FILE *lra_dump_file;
+/* True if we split hard reg after the last constraint sub-pass. */
+bool lra_hard_reg_split_p;
+
/* True if we found an asm error. */
bool lra_asm_error_p;
if (live_p)
lra_clear_live_ranges ();
bool fails_p;
+ lra_hard_reg_split_p = false;
do
{
/* We need live ranges for lra_assign -- so build them.
live_p = false;
if (! lra_split_hard_reg_for ())
break;
+ lra_hard_reg_split_p = true;
}
}
while (fails_p);
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-Os -fno-PIC" } */
+int sg;
+long int kk;
+
+void
+bp (int jz, int tj, long int li)
+{
+ if (jz == 0 || tj == 0)
+ __builtin_unreachable ();
+
+ kk = li;
+}
+
+void
+qp (void)
+{
+ ++kk;
+
+ for (;;)
+ bp (1l / sg, 0, ~0u);
+}