1*7efdca56SMarcin Koscielnicki; RUN: llc -march=mips < %s | FileCheck %s
2*7efdca56SMarcin Koscielnicki; RUN: llc -march=mips64 < %s | FileCheck %s
3*7efdca56SMarcin Koscielnicki; RUN: llc -march=mipsel < %s | FileCheck %s
4*7efdca56SMarcin Koscielnicki; RUN: llc -march=mips64el < %s | FileCheck %s
5*7efdca56SMarcin Koscielnicki
6*7efdca56SMarcin Koscielnickideclare i8* @llvm.thread.pointer() nounwind readnone
7*7efdca56SMarcin Koscielnicki
8*7efdca56SMarcin Koscielnickidefine i8* @thread_pointer() {
9*7efdca56SMarcin Koscielnicki; CHECK: rdhwr $3, $29
10*7efdca56SMarcin Koscielnicki  %1 = tail call i8* @llvm.thread.pointer()
11*7efdca56SMarcin Koscielnicki  ret i8* %1
12*7efdca56SMarcin Koscielnicki}
13