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

--- Comment #8 from Richard Sandiford <rsandifo at gcc dot gnu.org> ---
(In reply to Richard Sandiford from comment #7)
> diff --git a/gcc/pair-fusion.cc b/gcc/pair-fusion.cc
> index 7aaf4fd6372..c5469993531 100644
> --- a/gcc/pair-fusion.cc
> +++ b/gcc/pair-fusion.cc
> @@ -1645,6 +1645,8 @@ pair_fusion_bb_info::fuse_pair (bool load_p,
>      PATTERN (first->rtl ()),
>      PATTERN (second->rtl ())
>    };
> +  bool frame_related_p = (RTX_FRAME_RELATED_P (first->rtl ())
> +                       || RTX_FRAME_RELATED_P (first->rtl ()));

Make that second->rtl () :)  Shouldn't be doing this stuff so late :)

>  
>    // Make copies of the patterns as we might need to refer to the original
> RTL
>    // later, for example when updating debug uses (which is after we've
> updated
> @@ -2027,6 +2029,8 @@ pair_fusion_bb_info::fuse_pair (bool load_p,
>    for (auto uid : tombstone_uids)
>      track_tombstone (uid);
>  
> +  RTX_FRAME_RELATED_P (pair_change->insn ()->rtl ()) = frame_related_p;
> +
>    return true;
>  }

Reply via email to