xref: /llvm-project/llvm/test/CodeGen/Mips/thread-pointer.ll (revision ae26f50aea4ef1a6c7058019f0db11a91bbcdade)
1; RUN: llc -mtriple=mips < %s | FileCheck %s
2; RUN: llc -mtriple=mips64 < %s | FileCheck %s
3; RUN: llc -mtriple=mipsel < %s | FileCheck %s
4; RUN: llc -mtriple=mips64el < %s | FileCheck %s
5
6declare ptr @llvm.thread.pointer() nounwind readnone
7
8define ptr @thread_pointer() {
9; CHECK: rdhwr $3, $29
10  %1 = tail call ptr @llvm.thread.pointer()
11  ret ptr %1
12}
13