On 12/21/20 9:32 AM, Richard Sandiford wrote:
> In the PR, fwprop was changing a call instruction and tripped
> an assert when trying to update a list of call clobbers.
> There are two ways we could handle this: remove the call clobber
> and then add it back, or assume that the clobber will stay in its
> current place.
>
> At the moment we don't have enough information to safely move
> calls around, so the second approach seems simpler and more
> efficient.
>
> Tested on x86_64-linux-gnu and aarch64-linux-gnu. OK to install?
>
> Richard
>
>
> gcc/
> PR rtl-optimization/98403
> * rtl-ssa/changes.cc (function_info::finalize_new_accesses): Explain
> why we don't remove call clobbers.
> (function_info::apply_changes_to_insn): Don't attempt to add
> call clobbers here.
>
> gcc/testsuite/
> PR rtl-optimization/98403
> * g++.dg/opt/pr98403.C: New test.
OK
jeff