diff options
author | Manman Ren <manman.ren@gmail.com> | 2016-01-15 19:35:42 +0000 |
---|---|---|
committer | Manman Ren <manman.ren@gmail.com> | 2016-01-15 19:35:42 +0000 |
commit | 4fe01bd8f96e4be0b83049b0cb17f4fd125476db (patch) | |
tree | 3f6be08d289064f93ca90acabc385181ef051c56 /llvm/test/CodeGen | |
parent | 285d7bd4e78c2fdd03b714910776785264e5f6a9 (diff) | |
download | bcm5719-llvm-4fe01bd8f96e4be0b83049b0cb17f4fd125476db.tar.gz bcm5719-llvm-4fe01bd8f96e4be0b83049b0cb17f4fd125476db.zip |
CXX_FAST_TLS calling convention: fix issue on X86-64.
When we have a single basic block, the explicit copy-back instructions should
be inserted right before the terminator. Before this fix, they were wrongly
placed at the beginning of the basic block.
I will commit fixes to other platforms as well.
PR26136
llvm-svn: 257925
Diffstat (limited to 'llvm/test/CodeGen')
-rw-r--r-- | llvm/test/CodeGen/X86/cxx_tlscc64.ll | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/X86/cxx_tlscc64.ll b/llvm/test/CodeGen/X86/cxx_tlscc64.ll index 70fe501040b..7f6e0d71cd7 100644 --- a/llvm/test/CodeGen/X86/cxx_tlscc64.ll +++ b/llvm/test/CodeGen/X86/cxx_tlscc64.ll @@ -9,6 +9,7 @@ @sg = internal thread_local global %struct.S zeroinitializer, align 1 @__dso_handle = external global i8 @__tls_guard = internal thread_local unnamed_addr global i1 false +@sum1 = internal thread_local global i32 0, align 4 declare void @_ZN1SC1Ev(%struct.S*) declare void @_ZN1SD1Ev(%struct.S*) @@ -50,3 +51,17 @@ init.i: __tls_init.exit: ret %struct.S* @sg } + +; CHECK-LABEL: _ZTW4sum1 +; CHECK-NOT: pushq %r11 +; CHECK-NOT: pushq %r10 +; CHECK-NOT: pushq %r9 +; CHECK-NOT: pushq %r8 +; CHECK-NOT: pushq %rsi +; CHECK-NOT: pushq %rdx +; CHECK-NOT: pushq %rcx +; CHECK-NOT: pushq %rbx +; CHECK: callq +define cxx_fast_tlscc nonnull i32* @_ZTW4sum1() nounwind { + ret i32* @sum1 +} |