summaryrefslogtreecommitdiff
path: root/test/CodeGen/Mips/thread-pointer.ll
blob: 60bee3d0303194ae04daf4e4cdcddc9e6d424352 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
; RUN: llc -march=mips < %s | FileCheck %s
; RUN: llc -march=mips64 < %s | FileCheck %s
; RUN: llc -march=mipsel < %s | FileCheck %s
; RUN: llc -march=mips64el < %s | FileCheck %s

declare i8* @llvm.thread.pointer() nounwind readnone

define i8* @thread_pointer() {
; CHECK: rdhwr $3, $29
  %1 = tail call i8* @llvm.thread.pointer()
  ret i8* %1
}