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

declare ptr @llvm.thread.pointer() nounwind readnone

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