https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102926
rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Ever confirmed|0 |1 Status|UNCONFIRMED |NEW Last reconfirmed| |2021-10-25 CC| |rsandifo at gcc dot gnu.org --- Comment #6 from rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> --- I guess the first step would be to wrap the rhs of: (define_insn "load_tp_hard" [(set (match_operand:SI 0 "register_operand" "=r") (unspec:SI [(const_int 0)] UNSPEC_TLS))] "TARGET_HARD_TP" "mrc%?\\tp15, 0, %0, c13, c0, 3\\t@ load_tp_hard" [(set_attr "predicable" "yes") (set_attr "type" "mrs")] ) in (const …), so that it can be rematerialised.