1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2; RUN: llc < %s -mtriple=riscv64 | FileCheck %s
3; RUN: llc < %s -mtriple=riscv32 | FileCheck %s
4
5declare i8* @llvm.thread.pointer()
6
7define i8* @thread_pointer() nounwind {
8; CHECK-LABEL: thread_pointer:
9; CHECK:       # %bb.0:
10; CHECK-NEXT:    mv a0, tp
11; CHECK-NEXT:    ret
12  %1 = tail call i8* @llvm.thread.pointer()
13  ret i8* %1
14}
15