https://gcc.gnu.org/bugzilla/show_bug.cgi?id=128437
--- Comment #9 from Drea Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Uroš Bizjak from comment #8)
> (In reply to Drea Pinski from comment #7)
> > is not being deleting. I think this is due to this being a call_insn. No
> > other target uses call here .... So back to a target specific issue.
>
> Please see bug 110606 comment 7. PPC defines it in the same way.
I wonder if we mark the call as being pure/const things will just work. rs6000
backend is not doing that either.
It just does:
rs6000_tls_symbol = init_one_libfunc ("__tls_get_addr");
While x86 does:
const char *sym
= ((TARGET_ANY_GNU_TLS && !TARGET_64BIT)
? "___tls_get_addr" : "__tls_get_addr");
ix86_tls_symbol = gen_rtx_SYMBOL_REF (Pmode, sym);
So I still think it is a backend issue (just in this case the issue is also for
both x86 and rs6000).