diff options
author | Stephen Hines <srhines@google.com> | 2014-12-01 14:51:49 -0800 |
---|---|---|
committer | Stephen Hines <srhines@google.com> | 2014-12-02 16:08:10 -0800 |
commit | 37ed9c199ca639565f6ce88105f9e39e898d82d0 (patch) | |
tree | 8fb36d3910e3ee4c4e1b7422f4f017108efc52f5 /test/CodeGen/PowerPC/tls-store2.ll | |
parent | d2327b22152ced7bc46dc629fc908959e8a52d03 (diff) | |
download | external_llvm-37ed9c199ca639565f6ce88105f9e39e898d82d0.zip external_llvm-37ed9c199ca639565f6ce88105f9e39e898d82d0.tar.gz external_llvm-37ed9c199ca639565f6ce88105f9e39e898d82d0.tar.bz2 |
Update aosp/master LLVM for rebase to r222494.
Change-Id: Ic787f5e0124df789bd26f3f24680f45e678eef2d
Diffstat (limited to 'test/CodeGen/PowerPC/tls-store2.ll')
-rw-r--r-- | test/CodeGen/PowerPC/tls-store2.ll | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/test/CodeGen/PowerPC/tls-store2.ll b/test/CodeGen/PowerPC/tls-store2.ll new file mode 100644 index 0000000..f884dd8 --- /dev/null +++ b/test/CodeGen/PowerPC/tls-store2.ll @@ -0,0 +1,33 @@ +; RUN: llc -march=ppc64 -mcpu=pwr7 -O2 -relocation-model=pic < %s | FileCheck %s + +target datalayout = "e-m:e-i64:64-n32:64" +target triple = "powerpc64le-unknown-linux-gnu" + +; Test back-to-back stores of TLS variables to ensure call sequences no +; longer overlap. + +@__once_callable = external thread_local global i8** +@__once_call = external thread_local global void ()* + +define i64 @call_once(i64 %flag, i8* %ptr) { +entry: + %var = alloca i8*, align 8 + store i8* %ptr, i8** %var, align 8 + store i8** %var, i8*** @__once_callable, align 8 + store void ()* @__once_call_impl, void ()** @__once_call, align 8 + ret i64 %flag +} + +; CHECK-LABEL: call_once: +; CHECK: addis 3, 2, __once_callable@got@tlsgd@ha +; CHECK: addi 3, 3, __once_callable@got@tlsgd@l +; CHECK: bl __tls_get_addr(__once_callable@tlsgd) +; CHECK-NEXT: nop +; CHECK: std {{[0-9]+}}, 0(3) +; CHECK: addis 3, 2, __once_call@got@tlsgd@ha +; CHECK: addi 3, 3, __once_call@got@tlsgd@l +; CHECK: bl __tls_get_addr(__once_call@tlsgd) +; CHECK-NEXT: nop +; CHECK: std {{[0-9]+}}, 0(3) + +declare void @__once_call_impl() |