https://gcc.gnu.org/bugzilla/show_bug.cgi?id=128966
Richard Sandiford <rsandifo at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |rsandifo at gcc dot gnu.org
--- Comment #13 from Richard Sandiford <rsandifo at gcc dot gnu.org> ---
The transformation seems correct in RTL terms. The key seems to be:
> Per the IA-64 SDM (Vol. 3, `stf.spill` / `ldf.fill`), a slot written by
> `stf.spill` must be read by `ldf.fill`.
which the ia64 backend isn't modelling. As Andrea says, this requirement
*does*
restrict how GCC handles registers, since if a register is allowed to change
between RFmode and anything else, that will also change the natural load/store
instruction.
Matt's patch in comment 12 looks like the correct fix to me FWIW. Changing
modes_tieable_p should be at most an optimisation; can_change_mode_class
is the hook that matters for correctness.