summaryrefslogtreecommitdiffstats
path: root/test/CodeGen/Mips/rdhwr-directives.ll
diff options
context:
space:
mode:
authorAkira Hatanaka <ahatanaka@mips.com>2012-07-05 19:29:31 +0000
committerAkira Hatanaka <ahatanaka@mips.com>2012-07-05 19:29:31 +0000
commitd45e37a0a567ece390bd84c32a5276ee75a0c952 (patch)
tree188cac60e75b51630e87cbb9e0d87313fa78d143 /test/CodeGen/Mips/rdhwr-directives.ll
parenta7e4558ec861145032865edcf56400be7558c2f8 (diff)
downloadexternal_llvm-d45e37a0a567ece390bd84c32a5276ee75a0c952.zip
external_llvm-d45e37a0a567ece390bd84c32a5276ee75a0c952.tar.gz
external_llvm-d45e37a0a567ece390bd84c32a5276ee75a0c952.tar.bz2
test case for r159770.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159771 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/Mips/rdhwr-directives.ll')
-rw-r--r--test/CodeGen/Mips/rdhwr-directives.ll15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/CodeGen/Mips/rdhwr-directives.ll b/test/CodeGen/Mips/rdhwr-directives.ll
new file mode 100644
index 0000000..27010d4
--- /dev/null
+++ b/test/CodeGen/Mips/rdhwr-directives.ll
@@ -0,0 +1,15 @@
+; RUN: llc -march=mipsel -mcpu=mips32 -relocation-model=static < %s | FileCheck %s
+
+@a = external thread_local global i32
+
+define i32 @foo() nounwind readonly {
+entry:
+; CHECK: .set push
+; CHECK: .set mips32r2
+; CHECK: rdhwr
+; CHECK: .set pop
+
+ %0 = load i32* @a, align 4
+ ret i32 %0
+}
+