https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116564

--- Comment #7 from Richard Sandiford <rsandifo at gcc dot gnu.org> ---
(In reply to Alex Coplan from comment #6)
> So I'm testing the following to do this (which so far survives bootstrap on
> aarch64):
> 
> diff --git a/gcc/df-problems.cc b/gcc/df-problems.cc
> index f32185b3eac..a7f9eae10d3 100644
> --- a/gcc/df-problems.cc
> +++ b/gcc/df-problems.cc
> @@ -3895,7 +3895,9 @@ df_simulate_defs (rtx_insn *insn, bitmap live)
> 
>        /* If the def is to only part of the reg, it does
>        not kill the other defs that reach here.  */
> -      if (!(DF_REF_FLAGS (def) & (DF_REF_PARTIAL | DF_REF_CONDITIONAL)))
> +      if (DF_REF_FLAGS (def) & (DF_REF_PARTIAL | DF_REF_CONDITIONAL))
> +     bitmap_set_bit (live, dregno);
> +      else
>       bitmap_clear_bit (live, dregno);
>      }
>  }
Thanks for the clear analysis.  Based on that, I agree that this looks like the
right fix FWIW.  I see that the commit message in
g:f60226fd72331398dd5fd239e9d1b4feccc91988 only covered definitions in SETs,
not CLOBBERs.
  • [Bug rtl-optimization/116564] [... rsandifo at gcc dot gnu.org via Gcc-bugs

Reply via email to