Denis Chertykov <[email protected]> writes:
> The fix for PR116778:
>
Added Vlad to CC.
> [...]
>
> diff --git a/gcc/lra-lives.cc b/gcc/lra-lives.cc
> index 49134ade713..510f7d927ab 100644
> --- a/gcc/lra-lives.cc
> +++ b/gcc/lra-lives.cc
> @@ -62,9 +62,10 @@ int lra_hard_reg_usage[FIRST_PSEUDO_REGISTER];
> /* A global flag whose true value says to build live ranges for all
> pseudos, otherwise the live ranges only for pseudos got memory is
> build. True value means also building copies and setting up hard
> - register preferences. The complete info is necessary only for the
> - assignment pass. The complete info is not needed for the
> - coalescing and spill passes. */
> + register preferences. The complete info is necessary for
> + assignment, rematerialization and spill to register passes. The
> + complete info is not needed for the coalescing and spill to memory
> + passes. */
> static bool complete_info_p;
> /* Pseudos live at current point in the RTL scan. */
> diff --git a/gcc/lra.cc b/gcc/lra.cc
> index bc46f56cf20..a38df0e9b7a 100644
> --- a/gcc/lra.cc
> +++ b/gcc/lra.cc
> @@ -2552,7 +2552,7 @@ lra (FILE *f, int verbose)
> if (lra_remat ())
> {
> /* We need full live info -- see the comment above. */
> - lra_create_live_ranges (lra_reg_spill_p, true);
> + lra_create_live_ranges (true, true);
> live_p = true;
> if (! lra_need_for_spills_p ())
> {