[LLVMbugs] [Bug 17580] New: Inefficient tls code for initila exec X86_64

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Oct 14 15:07:01 PDT 2013


http://llvm.org/bugs/show_bug.cgi?id=17580

            Bug ID: 17580
           Summary: Inefficient tls code for initila exec  X86_64
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Backend: X86
          Assignee: unassignedbugs at nondot.org
          Reporter: rafael.espindola at gmail.com
                CC: echristo at gmail.com, llvmbugs at cs.uiuc.edu,
                    nlewycky at google.com
    Classification: Unclassified

given
-----------------------
 __thread int obj;

int test() {
  return ((int)&obj) > 0;
}
--------------------

clang with -O2 produces this code for local exec:


    movq    $obj at TPOFF, %rax
    movq    %fs:0, %rcx
    addl    %eax, %ecx

gcc produces

    movq    %fs:0, %rax
    addq    $obj at tpoff, %rax

combining the move and the add.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20131014/25e5b348/attachment.html>


More information about the llvm-bugs mailing list