https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77416
--- Comment #6 from Peter Bergner <bergner at gcc dot gnu.org> --- Looking closer, it does seem remat is trying to handle these hard coded registers via its hard_regs field. One thing that strikes me as I look at that code, it checks for reg->type being == OP_IN or != OP_IN and for this particular pattern, the CA reg->type is OP_INOUT which I could see causing issues since we don't seem to handle inout regs.