diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2016-07-23 20:41:05 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2016-07-23 20:41:05 +0000 |
| commit | 01095a5d43bbfde13731688ddcf6048ebb8b7721 (patch) | |
| tree | 4def12e759965de927d963ac65840d663ef9d1ea /test/CodeGen/PowerPC/thread-pointer.ll | |
| parent | f0f4822ed4b66e3579e92a89f368f8fb860e218e (diff) | |
Notes
Diffstat (limited to 'test/CodeGen/PowerPC/thread-pointer.ll')
| -rw-r--r-- | test/CodeGen/PowerPC/thread-pointer.ll | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/CodeGen/PowerPC/thread-pointer.ll b/test/CodeGen/PowerPC/thread-pointer.ll new file mode 100644 index 000000000000..2e8282d8dfb0 --- /dev/null +++ b/test/CodeGen/PowerPC/thread-pointer.ll @@ -0,0 +1,17 @@ +; RUN: llc < %s -mtriple=powerpc-unknown-linux-gnu | FileCheck %s --check-prefix=CHECK-32 +; RUN: llc < %s -mtriple=powerpc64-unknown-linux-gnu | FileCheck %s --check-prefix=CHECK-64 +; RUN: llc < %s -mtriple=powerpc64le-unknown-linux-gnu | FileCheck %s --check-prefix=CHECK-64 + +; Function Attrs: nounwind readnone +declare i8* @llvm.thread.pointer() #1 + +define i8* @thread_pointer() { +; CHECK-32-LABEL: @thread_pointer +; CHECK-32: mr 3, 2 +; CHECK-32: blr +; CHECK-64-LABEL: @thread_pointer +; CHECK-64: mr 3, 13 +; CHECK-64: blr + %1 = tail call i8* @llvm.thread.pointer() + ret i8* %1 +} |
