https://gcc.gnu.org/bugzilla/show_bug.cgi?id=128437
--- Comment #18 from Uroš Bizjak <ubizjak at gmail dot com> --- Created attachment 66116 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=66116&action=edit Proposed patch v2 '%&' needs a local-dynamic TLS symbol only because the insn template prints it. The only users of the LD base are the "base + sym@dtpoff" forms built in legitimize_tls_address, and all of them contain the symbol. So if get_some_local_dynamic_name () finds no symbol, nothing can use the base, and the insn's result is dead. In that case the LD base patterns need not print the lea and call. They only have to define the result register.
