https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89290

--- Comment #2 from UroŇ° Bizjak <ubizjak at gmail dot com> ---
(In reply to Jakub Jelinek from comment #1)
> then the ix86_rewrite_tls_address splitter rewrites this into:
> (insn 12 6 10 2 (set (mem/c:TI (const:DI (unspec:DI [
>                         (symbol_ref:DI ("s") [flags 0x2a]  <var_decl
> 0x7ff97a130b40 s>)
>                     ] UNSPEC_NTPOFF)) [1 s+0 S16 A64 AS1])
>         (reg:TI 83)) "pr89290.c":7:5 -1
>      (nil))
> and finally we ICE in the split_double_move splitter.

The address is constant and offsettable_address_addr_space_p claims that the
address

(const:DI (unspec:DI [
            (symbol_ref:DI ("s") [flags 0x2a] <var_decl 0x7f4cf23f1b40 s>)
        ] UNSPEC_NTPOFF))


is offsettable due to:

  if (CONSTANT_ADDRESS_P (y))
    return 1;

So, we should probably allow addresses in the form of:

        movq    %rax, %fs:s+8@tpoff

Reply via email to