https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88723
--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Should be fixed, I'll let you test it before closing though. That said, I think this exact UNSPEC should be delegitimized by the target hook, (define_insn "movsi_pic_gotdata_op" [(set (match_operand:SI 0 "register_operand" "=r") (unspec:SI [(match_operand:SI 1 "register_operand" "r") (match_operand:SI 2 "register_operand" "r") (match_operand 3 "symbolic_operand" "")] UNSPEC_MOVE_GOTDATA))] "flag_pic && check_pic (1)" { #ifdef HAVE_AS_SPARC_GOTDATA_OP return "ld\t[%1 + %2], %0, %%gdop(%a3)"; #else return "ld\t[%1 + %2], %0"; #endif } suggests that (unspec:MODE [(reg:MODE) (reg:MODE) (symbol_ref)]) is either (mem:MODE (plus:MODE (reg:MODE) (reg:MODE))) or perhaps the third operand itself?