test case for r159770.
authorAkira Hatanaka <ahatanaka@mips.com>
Thu, 5 Jul 2012 19:29:31 +0000 (19:29 +0000)
committerAkira Hatanaka <ahatanaka@mips.com>
Thu, 5 Jul 2012 19:29:31 +0000 (19:29 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159771 91177308-0d34-0410-b5e6-96231b3b80d8

test/CodeGen/Mips/rdhwr-directives.ll [new file with mode: 0644]

diff --git a/test/CodeGen/Mips/rdhwr-directives.ll b/test/CodeGen/Mips/rdhwr-directives.ll
new file mode 100644 (file)
index 0000000..27010d4
--- /dev/null
@@ -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
+}
+