summaryrefslogtreecommitdiffstats
path: root/llvm/test
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2014-05-23 19:16:56 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2014-05-23 19:16:56 +0000
commita5bb2f61cfb8a707cf20b61bc13bf3f3d60c50f5 (patch)
tree3aed1affc220cd72906bd67ba29f70b2195d3b7b /llvm/test
parentffd8a3364c700f560b5d37e32364b5e53041f1cb (diff)
downloadbcm5719-llvm-a5bb2f61cfb8a707cf20b61bc13bf3f3d60c50f5.tar.gz
bcm5719-llvm-a5bb2f61cfb8a707cf20b61bc13bf3f3d60c50f5.zip
Use alias linkage and visibility to decide tls access mode.
This matches both what we do for the non-thread case and what gcc does. With this patch clang would match gcc's behaviour in static __thread int a = 42; extern __thread int b __attribute__((alias("a"))); int *f(void) { return &a; } int *g(void) { return &b; } if not for pr19843. Manually writing the IL does produce the same access modes. It is also a step in the direction of fixing pr19844. llvm-svn: 209543
Diffstat (limited to 'llvm/test')
-rw-r--r--llvm/test/CodeGen/Mips/tls-alias.ll2
-rw-r--r--llvm/test/CodeGen/X86/2008-03-12-ThreadLocalAlias.ll4
2 files changed, 3 insertions, 3 deletions
diff --git a/llvm/test/CodeGen/Mips/tls-alias.ll b/llvm/test/CodeGen/Mips/tls-alias.ll
index 3c810542cca..80fbe87a8d6 100644
--- a/llvm/test/CodeGen/Mips/tls-alias.ll
+++ b/llvm/test/CodeGen/Mips/tls-alias.ll
@@ -5,6 +5,6 @@
define i32* @zed() {
; CHECK-DAG: __tls_get_addr
-; CHECK-DAG: %tlsgd(bar)
+; CHECK-DAG: %tlsldm(bar)
ret i32* @bar
}
diff --git a/llvm/test/CodeGen/X86/2008-03-12-ThreadLocalAlias.ll b/llvm/test/CodeGen/X86/2008-03-12-ThreadLocalAlias.ll
index 6052c102af6..e64375a2b36 100644
--- a/llvm/test/CodeGen/X86/2008-03-12-ThreadLocalAlias.ll
+++ b/llvm/test/CodeGen/X86/2008-03-12-ThreadLocalAlias.ll
@@ -12,7 +12,7 @@ target triple = "i386-pc-linux-gnu"
define i32 @foo() {
; CHECK-LABEL: foo:
-; CHECK: leal __libc_resp@TLSGD
+; CHECK: leal __libc_resp@TLSLD
entry:
%retval = alloca i32 ; <i32*> [#uses=1]
%"alloca point" = bitcast i32 0 to i32 ; <i32> [#uses=0]
@@ -27,7 +27,7 @@ return: ; preds = %entry
define i32 @bar() {
; CHECK-LABEL: bar:
-; CHECK: leal __libc_resp@TLSGD
+; CHECK: leal __libc_resp@TLSLD
entry:
%retval = alloca i32 ; <i32*> [#uses=1]
%"alloca point" = bitcast i32 0 to i32 ; <i32> [#uses=0]
OpenPOWER on IntegriCloud