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: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected],
[email protected]
Classification: Unclassified
given
-----------------------
__thread int obj;
int test() {
return ((int)&obj) > 0;
}
--------------------
clang with -O2 produces this code for local exec:
movq $obj@TPOFF, %rax
movq %fs:0, %rcx
addl %eax, %ecx
gcc produces
movq %fs:0, %rax
addq $obj@tpoff, %rax
combining the move and the add.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs